I have read into the FindFirstFile and FindNextFile functions for windows extensively, and read numerous threads on the topic, but can't seem to break it down and figure out how to use it for what I need it to do. I am looking for any sort of help or further guidance so I can get started on this part of my project.
The following is what I need to accomplish:
1. I need to access and create a list of all of the sub-directories within the programs current directory.
2. I need to access and create a list of all of the files within each sub-directory.
3. I need to rename the files within each sub-directory numerically, i.e. 1, 2, 3, 4... etc (optional, but will make life easier).
4. I need to be able to move the files from within the sub-directories to somewhere else.
5. I need to be able to access the names of the files and their locations when they are all finally sorted to be used in writing html code. I.E. somehow pass the paths as a string when using fprintf, etc.
I have no idea where to even begin so ANY guidance would be much appreciated. This is a pretty big project for me to be trying to undertake, which I realize.
Thinks I have already read:
FAQ > Accessing a directory and all the files within it - Cprogramming.com
FindFirstFile function
FindNextFile function
file management in c
Help with renaming multiple files
As well as numerous other threads here on the boards.