Find Files

find files with names matching a regular expression

Fig 1. FindFiles Output

1.0 Concept

FindFiles locates files or directories with names that match a specified regular expression. It provides an option /s for recursive search. Run FindFiles with argument /h to see a usage message.
FindFiles is a very useful tool. For example, if you need to find the latest version of a file in a path "somePath" you can do this: FindFiles /P "somePath" /D /s /R "^someFile". That will report all the files in the directory tree rooted at somePath with name someName along with their last modified times.

2.0 Design

FindFiles consists of the packages: FindFileMgr, FileSystem, CodeUtilities, and StringUtilities.
FindFileMgr is a directory navigator that matches discovered files or directories against a supplied regular expression, and writes matches to the console. Navigation is supported with FileSystem package.
Its command line is parsed, using ProcessCmdLine from CodeUtilities, to discover the required starting path and processing options.

3.0 Build

FindFiles repository
Code was built with Visual Studio, Community Edition - 2019, and tested on Windows 10.
FindFile /h will show all of FileFinder's options. Tip: store FindFiles.exe in a folder on your path. With that, you can use it in any cmd prompt window.

3.0 Status