One of the options of -ns or -nsf or -rs is mandatory. Options are **not** sequential, their position in the argument list have no significance. For example: rnm filepath -ns name is the same as rnm -ns name filepath. Though passing the directory/file path at the end of the argument list is considered to be safe and wise.
Options are case insensitive, i.e -ssF and -ssf are the same.
Reverse Index
Name String
/n/ in name string will be replaced with filename without extension. If used with -nsf option, the filename will be the name taken from the Name String File.
/fn/ in name string will be replaced with full name of the files. If used with -nsf option, full name will be the name taken from the Name String File.
/rn/ in name string will be replaced with Replaced Name.
/pd/ in name string will be replaced with parent directory name of the current file or directory.
/wd/ in name string will be replaced with the current working directory name.
/l/ in name string will be replaced with line number from Name String File.
/la/ in name string will be replaced with actual line number from Name String File.
/dc/ in name string will be replaced with directory count.
/i/ in name string will be replaced with index.
/ir/ in name string will be replaced with reserved index.
/id/ in name string will be replaced with directory index (index inside a directory).
/idr/ in name string will be replaced with reserved directory index.
/-i/ in name string will be replaced with inverse index.
In general, -i ( /-ir/ /-idr/ etc..) in the above replacement rules (applies to indexes excluding line index) will mean inverse index conforming to their meaning.
Name String File
Search String
Terminate multiple search strings with ; , e.g '/regex/modifier;/regex2/modifier2;...'
Also you can provide multiple search strings with repeated -ss and/or -ssf options and files with repeated -ss/f and/or -ssf/f options. These options can be combined together too.
Index Field Length
Replaced Name
Replace String
Regarding the replace_part , there are several special cases:
& will be taken as the entire match found by the regex (search_part).
\1, \2 etc.. is the back-references, i.e you can access captured groups with these back-references. Up-to two digits after the \ will be taken as a back-reference.
\c to convert to lowercase and \C to convert to uppercase. No other character is allowed in replace_part if \c or \C is used.
\p is the prefix (i.e., the part of the target sequence that precedes the match).
\s is the suffix (i.e., the part of the target sequence that follows the match).
to insert a & literally, use \& and for \ use \\.
Two modifiers are available: g and i ; g stands for global and replaces every instances of match found and i stands for case insensitive search (default is case sensitive).Replace String is always performed on old file name.
Example: '/video/Episode /i//gi' will replace every instances of 'video' with 'Episode index' i.e you will get new rname as: Episode 1..., Episode 2..., etc...
Terminate multiple replace strings with ; e.g '/search1/replace1/gi;/search2/replace2/i;...'
Also you can provide multiple replace strings with repeated -rs option and multiple files with repeated -rs/f options. These options can be combined together too.
Regex
Only invalid characters for a file or directory name is the path delimiter and the null character (\0).
~/.neurobin/rnm
0 on success
1 on failure