F2: A Powerful Command-Line Tool for Batch Renaming Files and Directories

F2: A Powerful Command-Line Tool for Batch Renaming Files and Directories

Summary

F2 is a cross-platform command-line tool for batch renaming files and directories. Written in Go, it offers a safe and efficient way to manage file names with features like dry run, variable support, and undo functionality. This makes it an invaluable utility for developers and power users alike.

Repository Info

Updated on February 4, 2026
View on GitHub

Introdução

F2 is a cross-platform command-line tool for batch renaming files and directories quickly and safely. Written in Go, it provides a robust solution for managing file names across Linux, macOS, and Windows. This tool stands out with its focus on safety, performance, and user-friendly features.

Instalação

F2 can be installed in several ways. If you are a Go developer, you can use go install (requires v1.23 or later):

go install github.com/ayoisaiah/f2/v2/cmd/f2@latest

Other installation methods, including pre-compiled binaries for various operating systems, are available on the official documentation or the releases page.

Exemplos

F2 offers comprehensive renaming capabilities, from simple string replacements to complex regular expressions. It supports using file attributes, such as EXIF data for images or ID3 tags for audio files, to provide maximum flexibility. The tool defaults to a dry run, allowing you to review changes before applying them, and includes an undo functionality for easy correction of mistakes.

Porquê usar

F2 distinguishes itself from other renaming tools with several key advantages:

  • Dry Run by Default: Review renaming changes before proceeding.
  • Variable Support: Utilize file attributes like EXIF or ID3 tags for flexible renaming.
  • Safety First: Ensures every renaming operation is conflict-free and error-proof.
  • High Performance: Extremely fast and efficient, even with thousands of files.
  • Undo Functionality: Easily revert any renaming operation to correct mistakes.
  • Extensive Documentation: Clear, practical examples to help users make the most of its features.

Links

Here are some quick links to F2's documentation and resources: