I am trying to write a small console program to make my life easier at work. I need to back up several files, but the files are usually associated with the end user in some way or another. So the file names are never the same, so I need to conduct a search by extension.
.NSF - 6 files
.ID - 1 file
The only files that use those extensions are the files I need.
So far my program creates a new folder, and then grabs a few files that are always the same and copies them into the folder. I am stuck at finding the random named file and copying them into the new folder. I have read about using boost library, but I want to do this without using it as my work blocks the download.
If you have an example I would really appreciate it, as long as its easy enough for a noob to halfway understand.
The way I did something like this was to make a bat file that would create a file list. I'm still looking for a way to search files and sub folders in C++ myself.
1 2 3 4
cd \<folder to search>
dir /b/s *.nsf > backup.txt
dir /b/s *.id >> backup.txt
Then call the C++ program to create directory, move the files, update log file or what ever else you need.
This program is not mine, but the closest I have found to create a file list. It only works on a single folder and it displays files and folders. I haven't had a chance to see if I could limit the output to a specific file name or search subfolders.