Results 1 to 4 of 4
  1. #1
    reeveliew is offline Member
    Join Date
    May 2010
    Posts
    13
    Rep Power
    0

    Default can i remove a file from a input? can provided a full code for me?

    run the code and a box pop up for input, key in " 1", the file 1.txt deleted


    thx !!!

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Read the API specs for the JOptionPane and the File classes. They have methods that will do the job.
    Careful with the path of the files you are deleting though, you just said 1.txt should be deleted but which 1.txt file if there are many of them in different directories?

  3. #3
    reeveliew is offline Member
    Join Date
    May 2010
    Posts
    13
    Rep Power
    0

    Default

    no, its just in a directories. can u provided the code for me? i am still new. thx

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Read the specs for those classes like I said and try the code yourself first.
    You can always post again if you get problems with your code.
    It's the best way to learn.

Similar Threads

  1. Replies: 3
    Last Post: 01-11-2010, 06:48 AM
  2. Replies: 0
    Last Post: 09-21-2009, 11:33 AM
  3. Remove repeated code
    By FraggleBoDiddly in forum New To Java
    Replies: 6
    Last Post: 10-26-2008, 02:28 PM
  4. Can any one solve this?I want full code.
    By sreenathuuu in forum New To Java
    Replies: 3
    Last Post: 08-20-2008, 08:45 AM
  5. How to remove Control Characters from an input file?
    By renjan in forum Advanced Java
    Replies: 0
    Last Post: 08-01-2007, 03:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •