# Rename

The **Rename** internal command can be used to:

* Trigger [inline rename](../../../file_operations/renaming_files/inline_rename) mode, letting you quickly edit the name of a file or folder
* Display the [Rename](../../../file_operations/renaming_files) dialog, letting you perform wildcard and scripted renames on multiple files at once
* Perform automated rename operations
* [Embed a rename script](../../../customize/creating_your_own_buttons/embedding_rename_scripts) in a button or hotkey

Note that the [Advanced Rename](../../../file_operations/renaming_files/advanced_rename) dialog lets you automatically create a command line using the user interface - simply configure the dialog as desired and then select **Create function from current settings** from the dropdown **Clipboard** menu at the bottom of the dialog.

**Command Arguments:**

| Argument        | Type | Possible values                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------- | ---- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| _(no argument)_ | -    | -                                                                        | <p>Displays the <a href="../../../file_operations/renaming_files"><strong>Rename</strong></a> dialog. The rename operation will be performed on all selected files and folders. The dialog will open in the last mode it was used in (either <a href="../../../file_operations/renaming_files/simple_wildcard_rename">simple</a> or <a href="../../../file_operations/renaming_files/advanced_rename">advanced</a>).</p><p><em>Example:</em> <code>Rename</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ADVANCED        | /S   | _(no value)_                                                             | <p>Displays the Rename dialog in <a href="../../../file_operations/renaming_files/advanced_rename">advanced</a> mode.</p><p><em>Example:</em> <code>Rename ADVANCED</code></p><p>When combined with rename patterns or preset names, the <strong>ADVANCED</strong> argument can be used to ensure the command opens the Rename dialog instead of immediately renaming all selected items.</p><p><em>Example:</em> <code>Rename ADVANCED PATTERN=* TO=*.bak</code><br><em>Example:</em> <code>Rename ADVANCED PRESET="Number Files"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| APPLYNOMATCH    | /S   | _(no value)_                                                             | <p>Turns on the <strong>Apply actions even if pattern doesn't match</strong> option for the rename function. This makes things like the <strong>CASE</strong> argument apply to all filenames, whether they match the old name pattern (given by the <strong>PATTERN</strong> argument) or not.</p><p><em>Example:</em> <code>Rename PATTERN "*.jpeg" TO "*.jpg" CASE=allwords APPLYNOMATCH</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| AUTONUMBER      | /S   | _(no value)_                                                             | <p>Automatically adds an incrementing number to the end of new filenames if they clash with existing files.</p><p><em>Example:</em> <code>Rename PATTERN "The *" TO * AUTONUMBER</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| BY              | /K/N | _\<increment>_                                                           | <p>Specifies the increment when renaming files with automatic numbering (using the <strong>NUMBER</strong> option). If not specified the default increment is 1.</p><p><em>Example:</em> <code>Rename NUMBER BY 2</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| CASE            | /K   | **upper**                                                                | <p>Converts filenames to all-upper case.</p><p><em>Example:</em> <code>Rename CASE=upper</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|                 |      | **lower**                                                                | <p>Converts filenames to all-lower case.</p><p><em>Example:</em> <code>Rename CASE=lower NUMBER</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|                 |      | **firstword**                                                            | <p>Capitalizes the first letter of the filename.</p><p><em>Example:</em> <code>Rename CASE=firstword</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|                 |      | **allwords**                                                             | <p>Capitalizes the first letter of each word of the filename.</p><p><em>Example:</em> <code>Rename CASE=allwords</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|                 |      | **extupper**                                                             | <p>Converts the filename extension to upper case.</p><p><em>Example:</em> <code>Rename CASE=extupper</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|                 |      | **extlower**                                                             | <p>Converts the filename extension to lower case.</p><p><em>Example:</em> <code>Rename CASE=extlower</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|                 |      | **extignore**                                                            | <p>Ignores the extension while applying case changes to the filename. Use this in conjunction with one of the other keywords.</p><p><em>Example:</em> <code>Rename CASE=upper,extignore</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| FINDREP         | /O   | _(no value)_                                                             | <p>Enable find-and-replace mode. The <strong>PATTERN</strong> argument must be used to provide the string to find, and the <strong>TO</strong> argument provides the string to replace it with. You can optionally combine this with the <strong>REGEXP</strong> argument.</p><p><em>Example:</em> <code>Rename FINDREP PATTERN="jones" TO="smith"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|                 |      | **ext**                                                                  | <p>Makes find-and-replace operate in the filename extension as well as in the stem of the filename.</p><p><em>Example:</em> <code>Rename FINDREP=ext PATTERN="jpg" TO="jpeg"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| FROM            |      | _\<filename> ..._                                                        | <p>Renames the files specified on the command line, rather than those selected in the source file display. This argument can accept filenames or <a href="../../wildcard_reference/pattern_matching_syntax">wildcard patterns</a>. Remember to enclose each filename in quotes if it contains spaces.</p><p><em>Example:</em> <code>Rename FROM C:\Spool\\.tmp TO *.temp</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| HEADING         | /O   | _(no value)_                                                             | <p>When used with commands which generate a list of items (see <a href="../../../customize/creating_your_own_buttons/editing_the_toolbar/dynamic_buttons">dynamic buttons</a>), the <strong>HEADING</strong> argument adds a small heading at the start of the list. The heading will be hidden when the list is empty. Headings only happen for commands which potentially generate multiple items at the same level as the button itself.</p><p>When <strong>HEADING</strong> is used by itself, without specifying a text value, the main button's label text is used for the heading.</p><p><em>Example:</em> <code>Rename PRESET=!list,favesonly HEADING</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|                 |      | _\<heading text>_                                                        | <p>You can specify the heading text if you want it to be different to the button's label.</p><p><em>Example:</em> <code>Rename PRESET=!list HEADING="Rename Presets"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| IGNOREEXT       | /S   | _(no value)_                                                             | <p>Turns on the <strong>Ignore extensions</strong> option for the rename function. Filename extensions won't be affected and don't need to be accounted for in any wildcard patterns.</p><p><em>Example:</em> <code>Rename PATTERN * TO *_backup IGNOREEXT</code></p><p>The <strong>Ignore extensions</strong> option is off by default for non-interactive renames, to avoid breaking old buttons. You only need to use the <strong>IGNOREEXT</strong> argument with rename commands which specify everything on the command line and do not open the Rename dialog.</p><p>The <strong>Ignore extensions</strong> option is on by default for interactive renames which open the dialog. You can turn the option off in the dialog via the separate <strong>NOIGNOREEXT</strong> argument, documented below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| INLINE          | /O   | _(no value)_                                                             | <p>Activates <a href="../../../file_operations/renaming_files/inline_rename">inline renaming</a> on the item in the source file display that currently has focus.</p><p><em>Example:</em> <code>Rename INLINE</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|                 |      | **all**                                                                  | <p>Automatically selects the entire filename for editing.</p><p><em>Example:</em> <code>Rename INLINE=all</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|                 |      | **name**                                                                 | <p>Automatically selects the filename's stem (but not the extension). Selects the whole name for a folder.</p><p><em>Example:</em> <code>Rename INLINE=name</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|                 |      | **endstem**                                                              | <p>Positions the cursor at the end of the filename's stem (before the extension), but does not automatically select any part of the name.</p><p><em>Example:</em> <code>Rename INLINE=endstem</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|                 |      | **ext**                                                                  | <p>Automatically selects the filename's extension. Selects the whole name for a folder.</p><p><em>Example:</em> <code>Rename INLINE=ext</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|                 |      | **home**                                                                 | <p>Positions the cursor at the beginning of the filename.</p><p><em>Example:</em> <code>Rename INLINE=home</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|                 |      | **end**                                                                  | <p>Positions the cursor at the end of the filename.</p><p><em>Example:</em> <code>Rename INLINE=end</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|                 |      | **single**                                                               | <p>If more than one item is selected, the <strong>Rename</strong> dialog will be displayed. Without this, inline rename will begin on the focused item only.</p><p><em>Example:</em> <code>Rename INLINE=name,single</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| MACRO           | /K   |                                                                          | <p>Lets you specify a rename <a href="../../../file_operations/renaming_files/advanced_rename/rename_actions/rename_macros">macro operation</a> string. You can use the macro builder in the Rename dialog to generate these strings and then hardcode them in a command.</p><p><em>Example:</em> <code>Rename</code> MACRO R0-6/L0+Final</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| MATCHCASE       | /S   | _(no value)_                                                             | <p>Makes the rename operation case-sensitive. Patterns and search strings must match the exact case of the filename.</p><p><em>Example:</em> <code>Rename PATTERN *.jpG TO *.JPG MATCHCASE</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| NOFILEINFO      | /S   | _(no value)_                                                             | <p>Disable file information metadata insertion. For example, the string <strong>{mp3title}</strong> would normally insert the title of an MP3 file in the new filename. With <strong>NOFILEINFO</strong> specified, the literal string "{mp3title}" would be inserted in the new filename.</p><p><em>Example:</em> <code>Rename PATTERN * TO *_{name} NOFILEINFO</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| NOIGNOREEXT     | /S   | _(no value)_                                                             | <p>Turns off the <strong>Ignore Extension</strong> option in the Rename dialog when it first opens. You only need to use this argument when opening the Rename dialog for interactive use.</p><p><em>Example:</em> <code>Rename PATTERN *.JPEG TO *.JPG ADVANCED NOIGNOREEXT</code></p><p>For non-interactive use of the Rename command, the <strong>Ignore Extension</strong> option is off by default (to avoid breaking old buttons) and can be turned on via the separate <strong>IGNOREEXT</strong> argument, documented above.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| NOMATCHNOFAIL   | /S   | _(no value)_                                                             | <p>Files which do not match the rename pattern are not 'failed'. This can be useful with multi-line functions which need to do some optional renaming before passing all of the files to additional commands.</p><p>By default, when <strong>NOMATCHNOFAIL</strong> is not used, if a file does not match the rename pattern then it will be flagged as a failure and skipped by the rest of the function (unless the very next command is another <strong>Rename</strong>, in which case the file gets a second chance).</p><p>If <strong>NOMATCHNOFAIL</strong> is used then files which do not match the rename pattern are still passed to subsequent commands.</p><p><em>Example:</em> <code>Rename PATTERN "* Backup.*" TO *.* NOMATCHNOFAIL</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| NUMBER          | /O   | _(no value)_                                                             | <p>Automatically number files. Selected files will be numbered in the order they are presented in the file display, so you should make sure the list is sorted as desired before using this command. The number 1 will be assigned to the first selected file, and the number for each subsequent file will be incremented by the value given for the <strong>BY</strong> argument (or by 1 if <strong>BY</strong> is not provided).</p><p>By default the number is added to the end of the filename, in front of the extension. You can specify a different location for the number by providing the <strong>[#]</strong> marker in the new filename.</p><p><em>Example:</em> <code>Rename PATTERN * TO \[#\]\* NUMBER</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|                 |      | _\<start>_                                                               | <p>Number files starting with the specified number. Providing a value for NUMBER also lets you zero-pad the assigned number. For example, the value <strong>0010</strong> means to start numbering at 10, and zero-pad to four digits. The <strong>[#]</strong> marker can also be used to specify zero-padding - <strong>[#5]</strong> would zero-pad to five digits.</p><p><em>Example:</em> <code>Rename NUMBER 00001 BY 2</code></p><p>If you add a <strong>!</strong> before the number, you can use this argument to specify the default value for the corresponding field in the Rename dialog without actually turning on the sequential numbering option. For example, you may want a default of "01" so you get padding to two digits without having to type the extra "0" every time you turn on the option in the UI. If you make use of that, you should also include the <strong>ADVANCED</strong> argument so the Rename dialog appears, instead of it silently performing a rename operation.</p><p><em>Example:</em> <code>Rename ADVANCED NUMBER=!01</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| PATTERN         | /K   | _\<pattern>_                                                             | <p>Specifies a wildcard pattern that represents the old (original) filename. This argument is used when performing a wildcard rename. The Rename command supports a simple wildcard syntax where one or more asterisks supplied for the <strong>PATTERN</strong> argument can be used to copy parts of the original name to the new name. The <strong>PATTERN</strong> argument is also used in conjunction with <strong>REGEXP</strong> to provide the search pattern for a regular expression rename, and in conjunction with <strong>FINDREP</strong> to provide the search string for a find-and-replace rename.</p><p>See the section on <a href="../../../file_operations/renaming_files">Renaming Files</a> for a full discussion of the various renaming modes.</p><p><em>Example:</em> <code>Rename PATTERN IMGP(.*).jpg TO "Image \1.jpg" REGEXP</code></p><p>Specifying the <strong>FROM</strong> argument as well will mean the command ignores the current file selection and applies the specified rename on all matching files. Only files matching both the TO and PATTERN arguments would be renamed.</p><p><em>Example:</em> <code>Rename FROM *.jpg PATTERN IMGP(.*).jpg TO "Image \1.jpg" REGEXP</code></p><p>If the <strong>PATTERN</strong> and <strong>TO</strong> arguments are both given, the command will normally apply the rename immediately, without prompting for any further interaction; you can add the <strong>ADVANCED</strong> argument to instead display the Rename dialog, with the specified pattern, so that you can preview the operation and make adjustments, or cancel it entirely, as needed.</p><p><em>Example:</em> <code>Rename ADVANCED PATTERN * TO *.bak</code></p> |
| PRESET          | /K   | **findrep**                                                              | <p>Opens the <strong>Rename</strong> dialog in <em>Find and Replace</em> mode.</p><p><em>Example:</em> <code>Rename PRESET=findrep</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|                 |      | **regexp**                                                               | <p>Opens the <strong>Rename</strong> dialog in <em>Regular Expression</em> mode.</p><p><em>Example:</em> <code>Rename PRESET=regexp</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|                 |      | **regexpfindrep**                                                        | <p>Opens the <strong>Rename</strong> dialog in <em>Regular Expression + Find and Replace</em> mode.</p><p><em>Example:</em> <code>Rename PRESET=regexpfindrep</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|                 |      | <p><strong>last</strong><br><strong>!last</strong></p>                   | <p>Specifying <strong>PRESET=last</strong> opens the <strong>Rename</strong> dialog showing the settings from the last time the dialog was used. Similar to opening the dialog and clicking the <em>Last Rename</em> button.</p><p><em>Example:</em> <code>Rename PRESET=last</code></p><p>You can also use <strong>!last</strong> to apply the last rename automatically, without showing the <strong>Rename</strong> dialog first.</p><p><em>Example:</em> <code>Rename PRESET=!last</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|                 |      | **!list**                                                                | <p>Displays a generated list of saved rename presets (acts as a <a href="../../../customize/creating_your_own_buttons/editing_the_toolbar/dynamic_buttons">dynamic button</a>). Selecting a preset from the list will apply that rename operation to the currently selected files and folders.</p><p>The generated list can be controlled with the addition of the following keywords:</p><ul><li><strong>favesonly</strong>: Only displays presets marked as favorites.</li><li><strong>nofaves</strong>: Only displays presets not marked as favorites.</li><li><strong>nogroup</strong>: Don't not group favorite and non-favorite presets separately.</li></ul><p><em>Example:</em> <code>Rename PRESET=!list,favesonly</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|                 |      | _\<preset>_                                                              | <p>Applies the named saved rename preset to all currently selected files and folders. Rename presets are created through the <a href="../../../file_operations/renaming_files/advanced_rename"><strong>Advanced Rename</strong></a> dialog.</p><p><em>Example:</em> <code>Rename PRESET="Number Files"</code></p><p>You can add the <strong>ADVANCED</strong> argument to make the dialog open and allow you to make changes, or cancel the operation entirely, before the rename is applied.</p><p><em>Example:</em> <code>Rename ADVANCED PRESET="Number Files"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| RECURSE         | /S   | _(no value)_                                                             | <p>The rename operation will operate recursively on all files inside selected sub-folders.</p><p><em>Example:</em> <code>Rename PATTERN *.jpg TO *.jpeg RECURSE</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| REGEXP          | /S   | _(no value)_                                                             | <p>Enables regular expression mode. The search pattern must be provided with the <strong>PATTERN</strong> argument, and the replace pattern with the <strong>TO</strong> argument. You can optionally combine this with the <strong>FINDREP</strong> argument.</p><p><em>Example:</em> <code>Rename PATTERN "(.*) - (.*)\\(.*)" TO "\2 - \1.\3" REGEXP</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| RENAMEMATCHING  | /S   | _(no value)_                                                             | <p>Keeps files with the same stem and different extensions together when renumbering. For example, <strong>IMGP1032.JPG</strong> and <strong>IMGP1032.WAV</strong> when renamed would be given the same number.</p><p><em>Example:</em> <code>Rename NUMBER 0001 RENAMEMATCHING</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| SCRIPTARG       | /K/M | <p><em>&#x3C;option:value></em><br><em>[&#x3C;option:value>...]</em></p> | <p>Used to pass custom field values to a <a href="../../../scripting/rename_scripts">rename script</a>.</p><p><em>Example:</em> <code>Rename PRESET MyRename SCRIPTARG my_option:True</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| SIMPLE          | /S   | _(no value)_                                                             | <p>Displays the Rename dialog in <a href="../../../file_operations/renaming_files/simple_wildcard_rename">simple</a> mode.</p><p><em>Example:</em> <code>Rename SIMPLE</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| TO              | /O   | _\<new name>_                                                            | <p>Specifies the new name of the file to rename. This argument is also used to specify the 'to' pattern when renaming using wildcards or regular expression, and the 'replace' string when renaming in find-and-replace mode. This argument can also be provided without a value when doing a find-and-replace rename - in that case, the search string would be replaced with nothing.</p><p><em>Example:</em> <code>Rename PATTERN " (Copy)" TO FINDREP</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| TYPE            | /K   | **files**                                                                | <p>Force the rename to only operate on files - any selected folders will be ignored.</p><p><em>Example:</em> <code>Rename PATTERN * TO *.bak TYPE=files</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|                 |      | **dirs**                                                                 | <p>Force the rename to only operate on folders.</p><p><em>Example:</em> <code>Rename PATTERN * TO Copy_* TYPE=dirs</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| WHENEXISTS      | /K   | **ask**                                                                  | <p>Controls what happens if the new filename already exists. The default action is to <strong>ask</strong> the user for each existing file.</p><p><em>Example:</em> <code>Rename PATTERN * TO *.bak WHENEXISTS=ask</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|                 |      | **delete**                                                               | <p>Performs the rename as requested, deleting the file that already existed.</p><p><em>Example:</em> <code>Rename PATTERN * TO *.bak WHENEXISTS=delete</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|                 |      | **keep**                                                                 | <p>Performs the rename as requested, renaming the old file that already existed.</p><p><em>Example:</em> <code>Rename PATTERN * TO *.bak WHENEXISTS=keep</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|                 |      | **rename**                                                               | <p>Modifies the new name by adding a suffix to make it unique.</p><p><em>Example:</em> <code>Rename PATTERN * TO *.bak WHENEXISTS=rename</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|                 |      | **skip**                                                                 | <p>Skips any files that already exist, without performing the rename.</p><p><em>Example:</em> <code>Rename PATTERN * TO *.bak WHENEXISTS=skip</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
