Actions page
This page displays the actions that can be applied to the files.
- Change extension
- String replacement
- Multiple string remplacement
- String insertion
- Move string
- Characters deletion
- Enumeration
- Use mp3 tag info
- Use date & time
- Random names
- Change case
- Take names from list
- Regular expression
- Use EXIF info
This page has also commands to manage batch files. In addition to the Files toolbar which is always visible, a toolbar to manage these batch files is displayed. For more information about bathes, see this page.
At the bottom of the window, there are two panels:
- Preview of selected file, which displays the current and future name of the selected file of the Files list (or first file if none is selected). This preview is refreshed at each change in actions paramters, allowing you to directly see the results of what you change in these parameters.
- Batch contents (hidden by default), which displays the planned actions. It is described on the "Batch" page.
You can hide/show these panels using the checkbox at the left of their title.
Change extension
You can override the extension by a new one, or append the new one after existing one if you check the option for that.
The dot will be added in front of your extension. To remove current extension, simply leave the field empty.
String replacement
You can replace a text by another in the filenames. If the "Replace all occurences" option is not checked, only the first occurence of the text in each filename will be replaced.
This action can be also used for inserting a string before or after an existing one (if you do not know the position where the new string has to be placed). For example, if you want to insert "2" after all the "test" contained in names, replace "test" by "test2".
It can also be used for deleting a specified string: simply leave the second field empty for that.
Multiple string replacement
You can enter here multiple strings to replace. The left column contain the strings to search in names, the right column contains the text to put instead (which can be an empty string).
At first it was added for multiple character replacement, like replacing all accentuated characters by their latin equivalent. But I added support for strings instead of characters for some languages where one character may have to be translated to several latin characters, or vice versa.
You can save the grid contents to retreive it later from the drop-down list. Type a name in this field and click "Save".
To add a line in the grid, press "Ctrl" and "Plus" (+) keys. The new line will be added before the selected cell.
In the same way, pressing "Ctrl" and "Minus" (-) keys will remove current line.
String insertion
You can insert a string at any position, counting from begin or end of the name. Zero means that the string will be inserted before the first existing character or after the last one.
The extension is not included when counting characters, so an option to apply this to extension instead of name is provided.
This action supports the following tags :
%name%
: Put the original name of the file, without extension%ext%
: Put the original extension of the file, including the dot%folderN%
: Put the N-th parent folderSee the chapter consacred to folder tag on the "Formatting" page for more information.
Move string
You can move a predefined number of characters from a place to another of the name. Like for string insertion, the "From" and "To" position start at 0 (where 0 = before first character or after last one).
The "To" position counts the characters in the remaining ones. It means that first the specified number of characters are deleted, then the program will try to insert them again.
For example, in "abcdef" string, if you move 1 character from position 2 (the "c") to position 4, it will not appear after the "d" but after the "e": since the "c" has been removed, the "d" becomes the third character and the "e" the fourth.
Characters deletion
You can specify here a number of characters to cut, from a position (like for string insertion) or after a string.
Enumeration
For this action, you have to specify a mask. This mask has to contain at least the %num% tag, to indicate to the program where to put the number that it will generate.
%name%
: Put the original name of the file, without extension%ext%
: Put the original extension of the file, including the dot%num%
: Put the current number
For example, if you want to call your images "File 0001.jpg", "File 0002.jpg", etc. you can enter File %num%%ext%
. You can put ".jpg" instead of
"%ext%" if you do not want to keep original extension (or if all are the files are JPEG).
See the "Formatting" page for more information about masks and tags.
"Start at" is the number to give to the first file. "Number of digits" represent the minimum number of digits to write (if the current number as less digits, zeroes will be added in front of it; put this field at 1 if you do not want to insert zeroes in front of numbers). "Increment" is the amount added for each file.
If the files are grouped by folders (i.e. the primary sort is the folder name, so the folders' contents are not mixed in the list) you can use the option "Go back to start value...". It will restart at the "Start at" value when the current file is in another folder than the previous one. This allows to make same kind of enumeration in lots of folders without having to do the operation for each folder separately.
Use mp3 tag info
Here again you have to enter a mask. There are a few special tags recognized. See the "Formatting" page for more information.
%author%
: Author/Artist%title%
: Title of the song%album%
: Album name%year%
: Year%genre%
: Genre/Category%comm%
: Comment%track%
: Track number, which is only present since ID3v1.1 and which is stored instead of the last byte of Comment field.
%name% and %ext% tags are also available.
Since a mp3 tag can contain any character, an option allows to remplace forbidden characters. Quotation marks "..." will be replaced by double apostrophes ''...'' (two ' together). Question mark will be replaced by a point (dot). Other characters will be replaced by a dash.
Use date & time
This action uses a different mask system. The tags are simple letters:
f
: Original filename (without extension)e
: Original extension (including dot)c
: Date and time using the standard format in Windowsd
: Day without a leading zero (1-31)dd
: Day with a leading zero (01-31)ddd
: Day, short name (Sun-Sat)dddd
: Day, full name (Sunday-Saturday)ddddd
: Date using Windows' short date formatdddddd
: Date using Windows' long date formatm
: Month without a leading zero (1-12)mm
: Month with a leading zero (01-12)mmm
: Month, short name (Jan-Dec)mmmm
: Month, full name (January-December)yy
: Year, 2-digit number (00-99)yyyy
: Year, 4-digit number (0000-9999)h
: Hour without a leading zero (0-23)hh
: Hour with a leading zero (00-23)n
: Minute without a leading zero (0-59)nn
: Minute with a leading zero (00-59)s
: Second without a leading zero (0-59)ss
: Second with a leading zero (00-59)am/pm
: Uses the 12-hour clock for the preceding h or hh (can be in uppercase)a/p
: Uses the 12-hour clock for the preceding h or hh (can be in uppercase)
If m or mm immediately follows h or hh, minute rather than month is used
Be careful with date and time formats, especially when using Windows' format. The "/" and ":" are often used as delimiters, but they cannot be used in a filename. So if you use these as default delimiter, you have to insert manually other delimiter between quotes, as explained in next paragraphs.
Here all the character that are not part of the mask have to be put inside quotes (single or double). I recommend to use double quotes (quotation marks "...") instead of single (apostrophes '...') so you can put apostrophes inside the quotes.
Here are few valid examples:
yyyy'-'mm'-'dde
: Uses yyyy-mm-dd date format, foces separator to be "-", and keeps original extension."a'b" yyyymmdd".txt"
: Here is an example of including an apostrophe inside a quote. A ".txt" extension is forced.yy'-'mm'-'dd hh'-'nn'-'sse
: Also includes the time in the name, in 24-hour format.yy'-'mm'-'dd hh'-'nn'-'ss am/pme
: Same, but using 12-hour format (with am/pm) instead of 24-hour. The am/pm is displayed after the whole time.
Since multiple files can have the same date (or time), an option can be checked to add a suffix after the duplicate files. This suffix is a long number. In a future version it will be possible to control this better.
You can choice to use either creation date/time or last modification date/time. The first one is the date when the file was put on the disk, the second one is the date when the file was modified. If you recently put an old file on a new disk, the creation date may be more recent than the modification date. Most of the time it is the modification date that is used.
Random names
Using the same mask system than Enumeration and Use mp3, you can generate here new names that will contain a random part. Like in these two actions, %name% and %ext% tags are also available.
The %random%
tag will put a random number, generated according to one of these options:
- Random number : Generates 8 digits randomly.
- Windows tick count : This is not really a random number, it is Windows' tick count. It is the number of milliseconds since Windows started (and returns to zero after about 49.7 days), so these numbers are sequencial.
- GUID : These special strings are very long identifiers, designed to be unique (generated using network address, date, time and other similar data). You can be sure that you will never get two identical GUID. The only downside is that they do not look very good, e.g. "{FC7F6B42-A25A-47B1-96A7-52A12BC36A02}".
Change case
With this action it's only the case (uppercase/lowercase) of the letters that will change, so the name will not really change since names are case-insensitive on Windows systems.
You can make different kinds of changes. The first one, "Upper first letter following...", is usually used to make mixed-case names (i.e. you have to put in the field characters like space, dash, dot, etc.)
Usually it is better to keep the option "Use Windows' locale..." checked. This will ask to Windows to change the case, so depending of the current language settings the accentuated characters will be properly modified. If this option is not checked, only standard latin letters (a..z) are modified.
Take names from list
For this action, you simply have to give a list of the new name. Ant Renamer will rename the files to these names.
By default it takes each line as a full name, but if you do not want to override extensions (i.e. take the name without extension from the list and then append original extension) you can check the option "Append original extension..."
You can also simply give a list of extensions, and check the "Use items as extensions..." option. Then the names will not be modified.
If the list is too short, the files that do not have a matching line from the list will not be renamed. Same when an empty line is found in the file.
Regular expression
If you are familiar with the syntax of these expressions, you will be able to quickly extract part of the file names to generate a new name in one step rathing than having to combine several actions. You can even achieve some changes that could not be done with the classic move/insert/delete actions.
You need to provide to the program a regular expression and a "new name" string that contains $nn tags (where nn is a number) indicating where to place the characters found in the original file name.
For more information about the syntax of the regular expression, see the page dedicated to this.
Use EXIF info
Using the same mask system than several actions described above, you can generate with this action a new file name based on EXIF data contained in JPEG pictures. This can be, for example, very useful as replacement of the Use date & time action if the dates of your photos are not kept when you transfer them from your digital camera.
See "Formatting" page for more information. Due to the very long list of existing EXIF tags, they are listed on a separate page rather than being included here.