References
Notes
This parameter is used to rename files. It requires use of the parameter
ReplaceWith.
The rename operation is performed by specifying
- what part of a filename should be replaced and
- with which replacement a file should be renamed.
This parameter expects a regular expression for a filename pattern.
If the expression matches the filename then the regular expression groups in the
match are replaced.
Use with capturing groups
- For replacement "capturing groups" are used. Only the content of the capturing groups
is replaced.
- Multiple replacements are separated by a semicolon ";".
Example:
-
ReplaceWhat: (1)abc(12)def(.*)
-
ReplaceWith: A;BB;CCC
These setting result in the following rename operation:
- Name of original file: 1abc12def123.txt
- Name of renamed file: AabcBBdefCCC
Use without capturing groups
If no "capturing groups" are specified then the entire match is replaced.
Example:
-
ReplareWhat: Hello
-
ReplaceWith: 1234
These setting result in the following rename operation:
- Name of original file: Hello_World.txt
- Name of renamed file: 1234_World.txt
For further information see java.util.regex.Pattern