# Bulk rename

Navigation: Using the TreeSize File Search > # Bulk rename |

This dialog allows renaming multiple files at once, using one of several types of rules.

To define a new renaming rule, click the "+" Icon and select one of the available rule types. The section "Available Rules" shows all rules that have previously been created. Each rule can be activated or deactivated individually and will be applied in the order that they are displayed in. You can reorder existing rulesets by using the icons on top of the list, or by simply dragging and dropping them within the list of available rules. Existing rules can be modified by selecting them. Changes to their configuration will be applied to the preview section immediately.

The right hand side show a preview of the current ruleset. It shows the file names before and after the rename operation and provides a quick overview of whether or not the filename will change or remain the same after the operation.

Available Rules

This list shows all previously created renaming rules. The rename operation will be applied in the order of this list. To change the order that the rules are applied in, simply drag and drop the rules to their designated position within the renaming chain. You can also use the right click menu to move the current selection up, or down in the list.

Existing rules can be temporarily disabled via the left hand checkboxes. Only active rules will be regarded in the actual renaming operation

### Replace | A simple search and replace operation for file names. Under "Configuration", you can enter the search term to search and what to replace it with. Activate the option "Use Regular Expression", if the input term should be interpreted as a regular expression, instead of an exact match. Further information about regular expressions can be found here.
### Insert | Inserts the given text to the file name at the position that is defined under "Configuration". The text can be appended as prefix, as suffix, or at a specific position.
### Serialize | Adds a number to the files, starting with the value that is defined under "Configuration". The number can be added as prefix, as suffix, or at a specific position. It is also possible to unify the numbering to a minimum length. Check the option "Pad to length", in order fill up numbers with leading "0"s and ensure a unified length.
### Delete | The delete rule has two options: Search and removes a certain text, or delete text at a certain position within the target file names. "Delete text" will remove all occurrences of a given search term. "Delete from position" will remove text at a given position within the target file names. Use "Length" to define how many characters should be removed.

The selection "Filename", "Extension only", "Full Name" determines which part of the file name should be affected by the rename operation. This selection can be configured for each rule individually.

Preview

This panel shows a preview of the rename operation with the current selection of active renaming rules. The column "Name" shows the original file name, while "New Name" shows a preview of the names as they would be after the rename operation. The "Change" column shows at one glance which names will change and which will remain the same. The column "Last operation status" will show whether or not the last renaming of a file was successful, after the operation has finished. If a file could not be renamed successfully, e.g. due to missing permissions, it will be shown in this column.

Execute

Starts the actual rename operation. All active rules will be applied to the files on the right hand side, one after another. Once the operation has finished, the status is shown in the column "Last operation status" of the preview list.

Undo

Reverts the last renaming operation back to its previous state. This effectively means that another rename operation is triggered that renames the files back to their original name.