Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009
    Posts
    14
    Rep Power
    0

    Default need to get the file name from folder

    Hi Everyone,

    i am a fresher to java coding i need some help from you. presently i looking to create a txt file which contains the filenames from particular folder so can any one help me in this regards please.....

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,574
    Rep Power
    12

    Default

    You can use the File class for this. An instance of File can represent the folder you are listing, and there are methods for obtaining the file names as strings.

    As far as creating the text file is concerned, do you know how to write text to a file? If not you should consult Sun's Tutorial.

    Post code and question if you get stuck.

  3. #3
    Join Date
    Aug 2009
    Posts
    14
    Rep Power
    0

Similar Threads

  1. Replies: 5
    Last Post: 01-27-2010, 10:14 PM
  2. Copy a file to a folder.
    By leric in forum New To Java
    Replies: 7
    Last Post: 07-29-2009, 06:11 AM
  3. folder/file menu items
    By jhughes in forum Advanced Java
    Replies: 2
    Last Post: 07-21-2009, 11:57 PM
  4. Can we Add lib folder insdie Project JAR file ?
    By mahendra.athneria in forum AWT / Swing
    Replies: 1
    Last Post: 01-30-2009, 06:51 PM
  5. how to access shared file/folder in LAN
    By ksheetiz in forum Networking
    Replies: 1
    Last Post: 05-24-2008, 05:54 AM

Posting Permissions

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