Skip to content

Command line options

Ayooluwa edited this page May 4, 2021 · 8 revisions

This is the output of f2 --help:

DESCRIPTION:
  F2 is a command-line tool for batch renaming multiple files and directories quickly and safely

USAGE:
   f2 FLAGS [OPTIONS] [PATHS...]

AUTHOR:
   Ayooluwa Isaiah <[email protected]>

VERSION:
   v1.5.7

FLAGS:
   --find <pattern>, -f <pattern>       Search <pattern>. Treated as a regular expression by default. Use -s or --string-mode to opt out
   --replace <string>, -r <string>      Replacement <string>. If omitted, defaults to an empty string. Supports built-in and regex capture variables
   --replace-limit value, -l value      Limit the number of replacements to be made (replaces all matches if set to 0) (default: 0)
   --string-mode, -s                    Opt into string literal mode by treating find expressions as non-regex strings (default: false)
   --exclude <pattern>, -E <pattern>    Exclude files/directories that match the given find pattern. Treated as a regular expression. Multiple exclude <pattern>s can be specified.
   --exec, -x                           Execute the batch renaming operation (default: false)
   --recursive, -R                      Rename files recursively (default: false)
   --max-depth <integer>, -m <integer>  positive <integer> indicating the maximum depth for a recursive search (set to 0 for no limit) (default: 0)
   --undo, -u                           Undo the last operation performed in the current working directory. (default: false)
   --sort <sort>                        Sort the matches according to the provided <sort> (possible values: default, size, mtime, btime, atime, ctime)
   --sortr <sort>                       Same as <sort> but presents the matches in the reverse order (possible values: default, size, mtime, btime, atime, ctime)
   --ignore-case, -i                    Ignore case (default: false)
   --quiet, -q                          Don't print out any information including errors (default: false)
   --ignore-ext, -e                     Ignore extension (default: false)
   --include-dir, -d                    Include directories (default: false)
   --only-dir, -D                       Rename only directories (implies include-dir) (default: false)
   --hidden, -H                         Include hidden files and directories (default: false)
   --fix-conflicts, -F                  Fix any detected conflicts with auto indexing (default: false)
   --help, -h                           show help (default: false)
   --version, -v                        print the version (default: false)

DOCUMENTATION:
  https:/ayoisaiah/f2/wiki

WEBSITE:
  https:/ayoisaiah/f2
Clone this wiki locally