August 24th, 2003, 11:33 AM
Search for Files and copy them with new name
I am having a hard time being able to search through a directory tree through folders looking for certain file extensions and then copying them to a new name...can anyone offer assistance or an idea of what functions I should be looking at.
I can search 1 directory and find my file...but I can seem to search multiple directories.
August 24th, 2003, 01:43 PM
I noticed from a previous post of yours, that you use Visual C++ on Windows. In this case, use FindFirstFile() and FindNextFile() to recurse through the directory tree. Search http://msdn.microsoft.com for documention on these functions. For an example of how to recurse through the dir tree:
Traverse an NTFS Directory
Note that the code will search through any windows file system (not just NTFS, as the thread title says). Also, it handles files and directories, not just the directories alone. Hope this helps
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
August 24th, 2003, 01:44 PM
August 24th, 2003, 03:01 PM