Recurse (advanced file searching in C++)
The directory recursion class is an object oriented file search class for
Microsoft Windows Operating Systems. It is easy to search for matching files
at a single directory level in VB or Visual C++ using _findfirst() and
_findnext() but not for multiple directory and full volume searching.
This class makes it easy.
As far as I know Microsoft have never supplied the source code to a class that will work for all
the conditions that the DOS 'dir' command does.
IBM PC Compatible,
Windows 95/98/ME/NT4.0 or 2000,
Visual C++ 5 or 6 (nothing to stop it building on previous versions),
The specialisation of the recurse class for any purpose is done by inheritence of
the basic recurse class. The foundHandler() function is marked as a virtual function so that it
can be specialised in the derived class. foundHandler() acts as a callback for the recursion
An example application for this class is in a batch processing utility. l3batch.exe has been
provided to show how command line programs can be executed by substitution of strings with matched file names.
A batch processing system can be setup to do neat things like call rmbatch.exe, the RealProducer command line convertor.
rmbatch.exe cannot perform wildcard expansion in a single command, but using this utility
we can make a system that can. Using this system any MP3 encoder could be batched, for example.
Programs that I have written using this class
Duplicate file checking utility,
File integrity checking utility,
MP3 tag namer.
1. Load .dsw into Visual C++,
2. Goto Build\Rebuild All,
3. It should run.
1. Rebuilt and retested with Visual C++ 6 (no code changes),
2. Notes and sanity check batch file removed for final release.
1. Limited UNC expansion added,
2. Relative far directory file\directory name searching on another drive fixed.
1. Better debug build checks added,
2. Wildcard expansion corrected for when a drive letter appears in a file specification in a relative path.
1. listfiles() expansion rewritten for more conditions.
1. Dot and slash reduction added.
1. Basic version.
Back to index.