You can use metadata (information about a file) to build up the new names of files by using various metadata insertion codes in the new name field.
In this example the original names of the MP3 files gave no information as to their content (01.mp3, 02.mp3, etc). Luckily, MP3 files usually contain metadata describing the music. Not only are we are using this metadata to rename the files, but we're using it to organize the music into folders.
Click the drop-down button to the left of the New name field to display a list of all the metadata fields that Opus supports.
These are the same fields as you can add to the file display as columns. When you pick a column from this menu (or one of the special, rename-only, options that appear at the bottom of the menu), the appropriate code is automatically inserted into the new name field at the current cursor position.
In the above example, we are using four music-related fields:
The back-slashes that we've inserted between these fields has the effect of moving the file into sub-folders (relative to the current folder) as well as renaming it. The sub-folders will be created automatically if they don't already exist.
The Keywords for Columns page contains a full list of the keywords that can be used by the Rename function.
As well as the full list of columns, the following codes can be used in the New name field:
The {parent} and {parentbase} codes can also strip the file extension from the parent name, which is usual if the parent folder is an archive file. To do this, add |noext to the code (e.g. {parentbase|noext}).
If you want to use rename to move files into new folders, adding $.\ at the start of the new name lets each file be moved relative to the base folder rather than its parent.
The original filename can be retrieved without the file extension using {name|noext}.
Sometimes metadata may contain characters that aren't valid in filenames. For example, the {time} field normally formats the time using colons (HH:MM:SS), and colons are not legal filename characters. By default illegal characters will be converted to the closest legal alternative (so for example, a colon will be converted to a semi-colon). However you may wish to control this process yourself:
Date and time fields let you configure the date format, the time format, or both. For example,
As you can see in the examples, D# is used to mark the date format, and T# is used to mark the time format. See the Codes for date and time page for information on date and time formats.
Numeric fields let you control zero-padding. For example,
If for some reason you want to include a metadata code in the new filename literally (e.g. you really want to call a file Blah{size}) you can escape the leading { with another { character. E.g. *{{size} as a new name would add the literal string {size} to the name of every file.