Files in A Directory

This is a discussion on Files in A Directory within the C++ Programming forums, part of the General Programming Boards category; Is it possible to read all the file names in one directory into a program? And if so how would ...

  1. #1
    Spanky devour89's Avatar
    Join Date
    Nov 2002
    Posts
    148

    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
    Spanky devour89's Avatar
    Join Date
    Nov 2002
    Posts
    148
    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,831
    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
    Spanky devour89's Avatar
    Join Date
    Nov 2002
    Posts
    148
    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,831
    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, 01:54 AM
  4. Listing files in a directory.
    By Devil Panther in forum C++ Programming
    Replies: 5
    Last Post: 11-04-2006, 08:39 PM
  5. Reading files in a directory
    By roktsyntst in forum Windows Programming
    Replies: 5
    Last Post: 02-07-2003, 09:04 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21