Thread: Files in A Directory

  1. #1

    Files in A Directory

    Is it possible to read all the file names in one directory into a program?

    And if so how would I do this?

    -Devouring One-
    Dev C++
    Win XP/2k/98

    I DO NOT TAKE CLASSES I DONT GET HOMEWORK THIS IS NOT A HOMEWORK QUESTION!!!

    He's lean he's keen... He's the spank machine!

  2. #2
    No one???? There must be a way to have a program look for all the files in a folder then read their filenames not the content.
    Dev C++
    Win XP/2k/98

    I DO NOT TAKE CLASSES I DONT GET HOMEWORK THIS IS NOT A HOMEWORK QUESTION!!!

    He's lean he's keen... He's the spank machine!

  3. #3
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    1. Don't bump your threads, it is against the rules and may result in your thread being deleted. The rules...

    http://cboard.cprogramming.com/annou...p?s=&forumid=3

    2. Use the FindFirstFile()/FindNextFile() API routines to list the files in a directory. Look them up in the help or at MSDN.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  4. #4
    Technacly I didn't bumb my thread, the one posted earlier wasn't posted by me it was posted by my friend and that problem we have over come.... it is only haveing to list all the files in a directory which we need to find out.
    Dev C++
    Win XP/2k/98

    I DO NOT TAKE CLASSES I DONT GET HOMEWORK THIS IS NOT A HOMEWORK QUESTION!!!

    He's lean he's keen... He's the spank machine!

  5. #5
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    I don't care if you, your friend or your dog bumped it, it was bumped.

    The question is answered.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading .dat files from a folder in current directory...
    By porsche911nfs in forum C++ Programming
    Replies: 7
    Last Post: 04-04-2009, 09:52 PM
  2. All files in a directory
    By cloudy in forum Linux Programming
    Replies: 1
    Last Post: 06-09-2008, 01:50 AM
  3. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 02:54 AM
  4. Listing files in a directory.
    By Devil Panther in forum C++ Programming
    Replies: 5
    Last Post: 11-04-2006, 09:39 PM
  5. Reading files in a directory
    By roktsyntst in forum Windows Programming
    Replies: 5
    Last Post: 02-07-2003, 10:04 AM