Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display files in directory 1

Status
Not open for further replies.

TalosBlack

Programmer
Jan 6, 2004
33
US
I am Trying to make a program which looks through all the files and folders in a given file directory and then saves some of the information about this file and compares it to a file of the same name in another folder. (This program is basically checking to see if the archived version of a file and the file in use are the same.) I know how to check a given file for the information i need and i know how to change the directory path. However, I can't figure out how to view the contents of a given folder. In other words i don't know how to look in a folder to see the files and subfolders it contains. I need to do this so i can go through all the subfolders so i can reach all the files and record and check the information i need. Any hints on how i can display the files and folders in a folder or another way to approach the problem would be great.

Thanks

John
 
Use FindFirstFile() and FindNextFile() to locate files (and folders).

/JOlesen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top