F2 — a CLI tool to batch rename files and directories quickly and safely

Posted on

I would like to present F2, a batch renaming command line tool written in Go and focused on speed and safety. I starting writing this tool last year but I got busy on other projects and I’m just getting around to making the first stable release.

F2 is very fast (see benchmarks) and performs several checks to keep the process safe to avoid overwriting files collisions.

Here’s a summary of its feature set:

  • Supports Linux, macOS, and Windows.

  • Supports filtering files using regular expression, including capture groups.

  • Ignores hidden directories and files by default.

  • Safe. F2 will not modify any file names until you tell it to.

  • Detects potential conflicts such as file collisions, or overwrites.

  • Supports recursive renaming of both files and directories.

  • Supports using an ascending integer for renaming (e.g 001, 002, 003, e.t.c.).

  • Supports undoing an operation from a map file.

  • Extensive unit testing.

More information, examples and installation instructions can be found on GitHub.

I would really like to receive feedback from the community to improve this tool.