about
12/01/2022
FindFiles Repo
FindFiles code

FindFiles  Repository

Used to find files with partially specified names

Quick Status Code functions correctly no known defects Demonstration code yes Documentation yes Test cases no Static library no Build requires C++17 option Planned design changes Update with new CodeUtilities
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

  • The FileFinder code repository is installed. No changes are anticipated for the FindFiles console application. Eventually, a GUI will be added that uses a file dialog to find the starting path and provides checkboxes for options. After initializing, the GUI will spawn the FindFiles application, supplying it with the user supplied options.
  • Developing FileFinder caused me to change CppUtilities::CodeUtilities::ProcessCmdLine to make it more flexible. All code in CppUtilities has been retested and appears to work as intended. And the CppUtilities repository has been updated to contain this new code. Note that there are a number of repositories that use an older version of ProcessCmdLine. That isn't a problem since they all contain and build against that older version. I will eventually update most of the repositories so that they all use the same versions of code they depend on.
  Next Prev Pages Sections About Keys