Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to know the files that exist at a certain directory in Java?

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to know the files that exist at a certain directory in Java?

    I'm doing a project for a Java Networking course. It's something like an FTP client and server.

    I need to know how to get the files that exist at a certain directory in the server so their names could be displayed in a GUI for the client to choose from.

    I really need this, can anyone help me?
    Thanks in advance.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: How to know the files that exist at a certain directory in Java?

    how to get the files that exist at a certain directory
    The File class has methods that will return the files that are in a directory.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. No such file or directory exist (help!)
    By hawkeye10 in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: October 14th, 2012, 09:36 PM
  2. How to copy files from one directory to another directory
    By kewlkeny in forum File I/O & Other I/O Streams
    Replies: 4
    Last Post: January 25th, 2012, 07:36 AM
  3. Checkin if a file exist within a directory
    By tash876 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: November 23rd, 2011, 02:16 PM
  4. Moving files in a Directory
    By Sai in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: March 23rd, 2010, 04:49 AM
  5. Java program which can list all files in a given directory
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 5
    Last Post: November 3rd, 2009, 09:42 AM