- Fix bug caused by space trimming in
--find
,--replace
,--exclude
, and--exclude-dir
- Fix bug with using commas in find or replace strings
This is a patch release to update the Go module to v2. It contains no new features.
- Add
natural
sort option for sorting filenames containing numbers in a natural way. - Add ability to extract double extensions like
.tar.gz
using{2ext}
- Add
--exiftool-opts
to customize Exiftool's output. - Add
--exclude-dir
flag for excluding whole directories when matching files. - Add ability to specify a custom pattern when fixing conflicts
(
--fix-conflicts-pattern
). - Add support for
file pair renaming with
--pair
and--pair-order
. - Add
--target-dir
option for specifying a target directory for renamed files. - Add
--clean
option for cleaning up empty directories after renaming. - Add ability to sort files based on arbitrary input using
--sort
and--sort-var
- Add ability to apply sorting per directory with
--sort-per-dir
- Add ability to reset an index when recursing into a new directory with
--reset-index-per-dir
.
- Significant performance improvements (up to ~3x faster than the previous version).
- Improve conflict detection by adding validations for:
- When the source file is not found.
- When the target name changes later in the same operation.
- Clean up output reporting.
- Improvements to
--undo
. - Improve CSV renaming implementation.
- Improve help messages and documentation.
- Fix status reporting for unchanged files.
- Fix dotfiles being regarded as hidden in Windows.
- Fix piping file arguments from external commands.
- Fix some Windows-specific bugs with CSV renaming.
- Remove random variables.
- Remove simple mode.
- Improve performance in dry-run mode (due to table rendering).
- Fix issue where files could be overwritten when
--fix-conflicts
is used.
- Simple mode now prompts before executing.
- You can now use capture variables with indexing.
- Syntax for string transformation has been improved and simplified.
- JSON support has been added.
- Simplify variables syntax.
- Add ability to extract date from arbitrary strings.
- Improve support for case insensitive filesystems.
- Indexing fixes and syntax updates.
- Add a "simple mode" for quick renaming operations in the current directory.
- Ignore extension flag no longer affects directory names.
- Default options can be changed via
F2_DEFAULT_OPTS
. - Fix duplicate paths when traversing directories to prevent unnecessary errors.
- Output is now sorted in dry-run mode.
- Update notification is now opt-in via
F2_UPDATE_NOTIFIER
. - Version information is now more streamlined.
- Dry run table output has been improved and made more compact.
Fixes:
- Path not specified error in Windows when running on a long path has been fixed.
The following enhancements were made:
- Quiet mode (
--quiet
) no longer suppresses errors. - Help output has been improved and made more succinct.
- Running F2 without arguments now shows a short help message.
This release brings the following improvements:
- CSV support (See renaming from a CSV file).
- Improved no color options. You can now set the
F2_NO_COLOR
environmental variable or use the brand new--no-color
flag to disable coloured output. - Validation error messages are now much clearer (no longer mixing emoji and text).
- Console output has been improved by using pterm. The green, red, and yellow colours are slightly different now due to this change.
- You can now specify a set of files or directory as argument to F2 (thanks to nightson for suggesting this enhancement).
- The backup directory has changed to
~/.local/share/f2/backups
on Linux,~/Library/Application Support/f2/backups
on macOS, and%LOCALAPPDATA%\f2\backups
on Windows. The previous backup directory (~/.f2/backups
) is still supported (in case you have existing backups there), but new backup files will not be created there anymore. This change was made to conform to the XDG specification and conventions for storing application files on each operating system, and to avoid cluttering up the home directory. - A
--verbose
option was added for outputting each renaming operation in--exec
mode.
Features:
- String literal mode now supports operation chaining
Feature enhancements:
- Fix rare bug where using
--fix-conflicts
could cause an existing file to be overwritten.
Feature enhancements:
- Add the ability to force overwriting files through the
--allow-overwrites
option.
Feature enhancements:
- You can now chain several renaming operations by specifying the
--find
and--replace
flags multiple times.
Feature enhancements:
- String transformation variables have been changed to match all other built-in variables.
Feature enhancements:
- Auto fixing conflicts is now more reliable especially when overwriting newly renamed paths.
- Trailing periods in a file or sub directory name is now detected as a conflict (Windows only).
Feature enhancements:
- Bug fixes for exif variables (prevent potential panic).
- Improve
--help
output. - Improve error message when reverting an operation.
- Replace slashes in
exiftool
output to prevent inadvertent directory creation.
Feature enhancements:
- Add
exiftool
support - Improve built-in exif variables
Fixes:
- Bug fixes for Exif variables
Feature enhancements:
- Add option to remove diacritics in file names so that
žůžo
becomeszuzo
. - Fix some minor bugs with undo mode.
Feature enhancements:
- Respect the
NO_COLOR
environmental variable. - Handle case insensitive filesystems correctly so that changes such as
abc.txt
->ABC.txt
do not produce conflicts.
Feature enhancements:
- Replacements can now start from the end of the file name by passing a negative
number to
--replace-limit
. For example,-2
will replace the last 2 matches in the file name.
Feature enhancements:
- Add the
-l
or--replace-limit
option for limiting replacements. - String literal mode now provides the correct output when used with
--ignore-case
.
Feature enhancements:
- Updated syntax for string transformation.
- Exif variables no longer output extra text for greater control. For example:
{{exif.et}}
gives1_10
instead of1_10s
.
Feature enhancements:
- Critical fix for undo mode where it wouldn't find the backup file for the current directory.
- Sorting matches in alphabetical order by default in dry-run mode.
- Improve performance when using built-in variables in the replacement string.
Feature enhancements:
- Fix roman numeral format for numbers over 3999.
- Slight change to randomise variable syntax.
Feature enhancements:
- Update syntax for random string variable.
- Ensure multiple instances of a random string variable is replaced correctly.
- Add support for file hash variables:
sha1
,md5
,sha256
, andsha512
.
Feature enhancements:
- Add a
--quiet
option so that F2 will not output any info to the standard output (including errors). - Improved colours and support coloured output on Windows.
- Add support for ID3 and random string variables.
- Add sorting options. You can sort by file size and date attributes.
- Conflict detection is now much improved. F2 will now check if the filename contains invalid characters or if it exceeds the maximum allowed length.
- Backups for each operation is now automated.
--undo
no longer takes a file argument, and the--output-file
flag is deprecated and removed. - The backup file is now deleted automatically after a successful reversion.
Feature enhancements:
- Auto create necessary directories when using backward slash () in replacement string (windows only).
- Full support for exif variables (JPEG, DNG, and most camera RAW formats).
- Add ability to limit max depth when searching recursively (
--max-depth
or-m
).
Feature enhancements:
- Proper support for hidden files and directories on Windows.
- Filter out matched files with the
--exclude
or-E
flag. - String mode now works correctly when the find pattern is empty (the whole string is replaced).
Feature enhancements:
- String-literal mode was previously using a regex to find matches, but has now been corrected to an ordinary string.
- String-literal mode supports case insensitive mode (
-i
or--ignore-case
).
Fixes:
- Auto fixing conflicts is now more reliable.
- Failure to match any files no longer causes the program to exit with an error.
Features:
- Implement date variables: (
ctime
,atime
,mtime
, e.t.c). - Add support for EXIF related variables for images.
- Add string literal mode.
- Minor fixes
Feature enhancements:
- The
--force
flag has been renamed to--fix-conflicts
. The short version remains-F
. - F2 will no longer overwrite files even if
-F
is used. Instead, it will differentiate conflicting files by appending a number suffix similar to how file managers work.
Fixes:
- Remove unnecessary version number prefix.
Features:
- Supports filtering files using regular expression, including capture groups.
- Ignores hidden directories and files by default.
- Dry run by default.
- 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.
Features:
- Undo last successful operation
- Specify starting index for numbering scheme
Initial release