FileRevisor is a cross-platform C++ command line program for quickly deleting large directories in parallel, quickly renaming files or directories, and quickly replacing text in text files.
- FileRevisor command line usage
- FileRevisor program modes
- Linux FileRevisor parallel directory deletion performance
- Windows FileRevisor parallel folder deletion performance
- FileRevisor code structure as it appears in Visual Studio Code on Linux
- FileRevisor code structure as it appears in Visual Studio 2022 on Windows
- Linux Jenkins jobs which build and statically analyze FileRevisor
- Windows Jenkins jobs which build and statically analyze FileRevisor
- 4 steps to build binary filerevisor from source on Linux with Clang
- 4 steps to build executable FileRevisor.exe from source on Windows with Visual Studio 2022
- Thanks to
FileRevisor v1.1.0 - Quickly delete directories, rename files or directories, or replace text in files.
Usage:
filerevisor delete-directory
--target=<TargetDirectoryPath>
[--parallel]
[--skip-files-in-use]
[--dryrun]
[--quiet]
filerevisor rename-files
--target=<TargetDirectoryPath>
--from=<FileNameRegex>
--to=<FileNameRegex>
[--recurse]
[--dryrun]
[--verbose]
filerevisor rename-directories
--target=<TargetDirectoryPath>
--from=<DirectoryNameRegex>
--to=<DirectoryNameRegex>
[--recurse]
[--dryrun]
[--verbose]
filerevisor replace-text
--target=<TargetDirectoryPath>
--from=<LiteralFileText>
--to=<ReplacementLiteralFileText>
[--recurse]
[--dryrun]
[--verbose]
filerevisor delete-directory
--target=<TargetDirectoryPath>
[--parallel]
[--skip-files-in-use]
[--dryrun]
[--quiet]
FileRevisor delete-directory
mode quickly deletes all files in and below --target=<TargetDirectoryPath>
. For extreme directory deletion performance, especially on Windows, specify --parallel
to delete subdirectories below TargetDirectoryPath
using one thread per subdirectory.
Here is filerevisor delete-directory
in action:
filerevisor rename-files
--target=<TargetDirectoryPath>
--from=<FileNameRegex>
--to=<FileNameRegex>
[--recurse]
[--dryrun]
[--verbose]
FileRevisor rename-files
mode renames files in a specified directory matching a specified regular expression. --recurse
can be specified to rename files in and below a specified directory.
Here is filerevisor rename-files
in action:
filerevisor rename-directories
--target=<TargetDirectoryPath>
--from=<DirectoryNameRegex>
--to=<DirectoryNameRegex>
[--recurse]
[--dryrun]
[--verbose]
FileRevisor rename-directories
mode renames directories in a specified directory matching a specified regular expression. --recurse
can be specified to rename directories in and below a specified directory.
Here is filerevisor rename-directories
in action:
filerevisor replace-text
--target=<TargetDirectoryPath>
--from=<LiteralFileText>
--to=<ReplacementLiteralFileText>
[--recurse]
[--dryrun]
[--verbose]
FileRevisor replace-text
mode replaces text in files containing a substring with a replacement substring. --recurse
can be added to replace text in files in and below a specified directory.
Here is filerevisor replace-text
in action:
As you can see from the above two graphs, Linux file deletions are quite a bit faster than Windows file deletions, with modest time savings available on Linux and massive time savings available on Windows by way of FileRevisor --parallel directory deletion.
The OS, CPU, and storage hardware which generated the above performance numbers is Fedora 33 / Windows 10, 32-core 64-thread AMD Threadripper 2990WX, and a 512 GB Samsung 970 PRO NVMe drive.
git clone https://github.com/NeilJustice/FileRevisor
cd FileRevisor && mkdir Release && cd Release
CXX=clang++ cmake .. -DCMAKE_BUILD_TYPE=Release
sudo cmake --build . --target install
Resulting binary /usr/local/bin/filerevisor
:
git clone https://github.com/NeilJustice/FileRevisor
cd FileRevisor
cmake . -G"Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX=C:\bin
cmake --build . --config Release --target install
Resulting executable C:\bin\FileRevisor.exe
:
brandmark.io for FileRevisor's logo