Placeholders
Within the following functions and input fields, the FileRenamer allows using placeholders: Mask, Search and Replace, Insert Text, Delete Text and Append Text.
The placeholders are replaced by what they stand for during renaming depending on the corresponding file or folder, time or list position. Placeholders can be combined with arbitrary other characters and they can also be used within regular expressions. Of course, the same placeholder can also be used several times in the same field.
At the moment, the following placeholders from the following categories are available in the FileRenamer:
A list of all available placeholders can also be found in the program under Name > Mask and Extension > Mask. Here you can also copy the placeholders directly to the clipboard for use.
File Name and Folder
Placeholders holding the name and path of the file.
%name% | Old Name of File |
%name,x,y% | Old Name of File from character x to character y - for example, %name,1,3% corresponds to the first three characters of the file name, %name,2,5% corresponds to the second through fifth character. |
%name,wordX% %name,wordexX% | Xth word from the old name of the file - Negative values of X count the words from behind. With %name,wordX%, only spaces are used as a separator between individual words, with %name,wordexX% in addition to spaces also hyphens, underscores, points and commas. If a file has, for example, the file name "ab cd ef.txt", %name,word1% and %name,word-3% correspond to the word "ab", %name,word2% and %name,word-2% are the word "cd" and %name,word3% as well as %name,word-1% are the word "ef". For the file name "ab-cd-ef.txt", %name,word1% would be the entire file name "ab-cd-ef", since the file name does not contain any spaces. Apart from that, for %name,wordex1% it would also be "ab" for this file name. |
%ext% | Old Extension of File |
%ext,x,y% | Old Extension of File from character x to character y |
%folderX% %folder‑X% |
Name of the Xth folder from the path of the file - The placeholders %folder1%, %folder2%, %folder3% up to %folder50% as well as %folder-1%, %folder-2%, %folder-3% up to %folder-50% are standing for the names of the folders in which the file is stored. Positive numbers like in %folder1% count the folders from the drive to the file, negative numbers like in %folder-1% count the other way around. Accordingly, the placeholder %folder1% is standing for the first folder of the path, %folder-1% is standing for the first folder below the file. When having the file C:\Holidays\Trips\Norway\Image100.jpg %folder1% will be replaced with "Holidays", %folder-1% with "Norway", when renaming the file. Correspondingly, the placeholder %folder2% is standing for the second folder in the path, this is "Trips" in that case (%folder-2% would be the same, counted from the top). You can find some examples how to use the folder placeholders in this tutorial. |
%folderX,Y,Z% %folder‑X,Y,Z% |
Characters Y to Z from the Xth folder from the path of the file - The placeholders %folderX,Y,Z% as well as %folder-X,Y,Z% work similarly to the placeholders %folderX% and %folder-X% described above. However, only the characters Y to Z are taken from the name of the Xth folder of the file path (counted from below respectively above). |
%folderX,wordY% %folderX,wordexY% | Word number Y from the folder number X from the path of the file - negative values of X or Y count the folders respectively the words from behind. With %folderX,wordY% only spaces are treated as separator between individual words, with %folderX,wordexY% in addition to spaces also hyphens, underscores, dots and commas. The counting of the folders works like described for the placeholders %folderX% and %folder-X%. The counting of the words like described for the placeholders %name,wordX% and %name,wordexX%. The placeholder %folder1,word1%, for example, stands for the first word of the first folder out of the path, %folder-1,word-1% stands for the last word of the last folder from the path and %folder3,word-2% stands for the penultimate word from the third folder of the path. |
You can find more information and some examples for the use of the placeholders regarding folders in the tutorial about renaming files in their folder names.
Numbering
Placeholders allowing a file numbering.
%num% | Number / Position of File within the list; the initial value, the increment and the number of leading zeros can be adjusted in the settings |
%0num% | Number / Position within the list with one leading zero (for example 01) |
%00num% | Number / Position within the list with two leading zeros (for example 001) |
%000num% | Number / Position within the list with three leading zeros (for example 0001) |
%0000num% | Number / Position within the list with four leading zeros (for example 00001) |
%00000num% | Number / Position within the list with five leading zeros (for example 000001) |
%0...0num% | Number / Position within the list with any number of leading zeros |
%abs0num% | Number / Position within the list with a number of leading zeros fitting to the total number of files in the list (1 to 9 for up to 10 files; 01 to 99 for 10 to 99 files; 001 to 999 for 100 to 999 files and so on) |
%abs% | Absolute Number of Files that are currently in the list |
%alph-a% | Numbering with lowercase letters instead of numbers; the same settings as for %num% are used |
%alph-A% | Numbering with uppercase letters instead of numbers; the same settings as for %num% are used |
A detailed explanation of these placeholders and their configuration options (such as the determination of an arbitrary value for the beginning and the increase of the count or the automatic reset of the counting with every new folder) can be found in the tutorial on the numbering of files and folders with the FileRenamer.
Current Date and Time
Placeholders referring to the current date and time.
%date% | Current date in the format "year-month-day" (two or four digits with leading zeros if necessary; short form for %yyyy%-%mm%-%dd%) |
%dd.mm.yyyy% | Current date in the format "day.month.year" (two or four digits with leading zeros if necessary; short form for %dd%.%mm%.%yyyy%) |
%yyyy-mm-dd% | Current date in the format "year-month-day" (two or four digits with leading zeros if necessary; short form for %yyyy%-%mm%-%dd%) |
%time% | Current time in the format "hour-minute-second" (two digits with leading zeros if necessary; short form for %hh%-%ii%-%ss%) |
%hh-mm-ss% | Current time in the format "hour-minute-second" (two digits with leading zeros if necessary; short form for %hh%-%ii%-%ss%) |
%hh-mm% | Current time in the format "hour-minute" (two digits with leading zeros if necessary; short form for %hh%-%ii%) |
%yyyy% | Current Year written with four digits |
%yy% | Current Year written with two digits |
%mm% | Current Month, always two digits, leading zeros if necessary |
%m% | Current Month, one or two digits without leading zeros |
%dd% | Current Day, always two digits, leading zeros if necessary |
%d% | Current Day, one or two digits without leading zeros |
%hh% | Current Hour, always two digits, leading zeros if necessary |
%h% | Current Hour, one or two digits without leading zeros |
%ii% | Current Minute, always two digits, leading zeros if necessary |
%i% | Current Minute, one or two digits without leading zeros |
%ss% | Current Second, always two digits, leading zeros if necessary |
%s% | Current Second, one or two digits without leading zeros |
Last Modification
In order to use the last modification date of the the file or folder as placeholder, we can add the extension "-m" to the placeholders for the current time and date.
%date-m% | Last modification date in the format "year-month-day" (two or four digits with leading zeros if necessary; short form for %yyyy-m%-%mm-m%-%dd-m%) |
%dd.mm.yyyy-m% | Last modification date in the format "day.month.year" (two or four digits with leading zeros if necessary; short form for %dd-m%.%mm-m%.%yyyy-m%) |
%yyyy-mm-dd-m% | Last modification date in the format "year-month-day" (two or four digits with leading zeros if necessary; short form for %yyyy-m%-%mm-m%-%dd-m%) |
%time-m% | Last modification time in the format "hour-minute-second" (two digits with leading zeros if necessary; short form for %hh-m%-%ii-m%-%ss-m%) |
%hh-mm-ss-m% | Last modification time in the format "hour-minute-second" (two digits with leading zeros if necessary; short form for %hh-m%-%ii-m%-%ss-m%) |
%hh-mm-m% | Last modification time in the format "hour-minute" (two digits with leading zeros if necessary; short form for %hh-m%-%ii-m%) |
%yyyy-m% | Last Modification Year written with four digits |
%yy-m% | Last Modification Year written with two digits |
%mm-m% | Last Modification Month, always two digits, leading zeros if necessary |
%m-m% | Last Modification Month, one or two digits without leading zeros |
%dd-m% | Last Modification Day, always two digits, leading zeros if necessary |
%d-m% | Last Modification Day, one or two digits without leading zeros |
%hh-m% | Last Modification Hour, always two digits, leading zeros if necessary |
%h-m% | Last Modification Hour, one or two digits without leading zeros |
%ii-m% | Last Modification Minute, always two digits, leading zeros if necessary |
%i-m% | Last Modification Minute, one or two digits without leading zeros |
%ss-m% | Last Modification Second, always two digits, leading zeros if necessary |
%s-m% | Last Modification Second, one or two digits without leading zeros |
Creation Date
For using the file or folder creation date as placeholder, we can add the extension "-c" to the placeholders for the current time and date.
%date-c% | Creation date in the format "year-month-day" (two or four digits with leading zeros if necessary; short form for %yyyy-c%-%mm-c%-%dd-c%) |
%dd.mm.yyyy-c% | Creation date in the format "day.month.year" (two or four digits with leading zeros if necessary; short form for %dd-c%.%mm-c%.%yyyy-c%) |
%yyyy-mm-dd-c% | Creation date in the format "year-month-day" (two or four digits with leading zeros if necessary; short form for %yyyy-c%-%mm-c%-%dd-c%) |
%time-c% | Creation time in the format "hour-minute-second" (two digits with leading zeros if necessary; short form for %hh-c%-%ii-c%-%ss-c%) |
%hh-mm-ss-c% | Creation time in the format "hour-minute-second" (two digits with leading zeros if necessary; short form for %hh-c%-%ii-c%-%ss-c%) |
%hh-mm-c% | Creation time in the format "hour-minute" (two digits with leading zeros if necessary; short form for %hh-c%-%ii-c%) |
%yyyy-c% | Year of Creation written with four digits |
%yy-c% | Year of Creation written with two digits |
%mm-c% | Month of Creation, always two digits, leading zeros if necessary |
%m-c% | Month of Creation, one or two digits without leading zeros |
%dd-c% | Day of Creation, always two digits, leading zeros if necessary |
%d-c% | Day of Creation, one or two digits without leading zeros |
%hh-c% | Hour of Creation, always two digits, leading zeros if necessary |
%h-c% | Hour of Creation, one or two digits without leading zeros |
%ii-c% | Minute of Creation, always two digits, leading zeros if necessary |
%i-c% | Minute of Creation, one or two digits without leading zeros |
%ss-c% | Second of Creation, always two digits, leading zeros if necessary |
%s-c% | Second of Creation, one or two digits without leading zeros |
Last Access
Like for the modification date and creation date placeholders, the suffix "-a" is standing for the last access to the file or folder.
%date-a% | Last access date in the format "year-month-day" (two or four digits with leading zeros if necessary; short form for %yyyy-a%-%mm-a%-%dd-a%) |
%dd.mm.yyyy-a% | Last access date in the format "day.month.year" (two or four digits with leading zeros if necessary; short form for %dd-a%.%mm-a%.%yyyy-a%) |
%yyyy-mm-dd-a% | Last access date in the format "year-month-day" (two or four digits with leading zeros if necessary; short form for %yyyy-a%-%mm-a%-%dd-a%) |
%time-a% | Last access time in the format "hour-minute-second" (two digits with leading zeros if necessary; short form for %hh-a%-%ii-a%-%ss-a%) |
%hh-mm-ss-a% | Last access time in the format "hour-minute-second" (two digits with leading zeros if necessary; short form for %hh-a%-%ii-a%-%ss-a%) |
%hh-mm-a% | Last access time in the format "hour-minute" (two digits with leading zeros if necessary; short form for %hh-a%-%ii-a%) |
%yyyy-a% | Last Access Year written with four digits |
%yy-a% | Last Access Year written with two digits |
%mm-a% | Last Access Month, always two digits, leading zeros if necessary |
%m-a% | Last Access Month, one or two digits without leading zeros |
%dd-a% | Last Access Day, always two digits, leading zeros if necessary |
%d-a% | Last Access Day, one or two digits without leading zeros |
%hh-a% | Last Access Hour, always two digits, leading zeros if necessary |
%h-a% | Last Access Hour, one or two digits without leading zeros |
%ii-a% | Last Access Minute, always two digits, leading zeros if necessary |
%i-a% | Last Access Minute, one or two digits without leading zeros |
%ss-a% | Last Access Second, always two digits, leading zeros if necessary |
%s-a% | Last Access Second, one or two digits without leading zeros |
Sources
Sources offer the opportunity to use the lines of a text for renaming a series of files or folders in the FileRenamer. You can open the window for entering the text using the menu "Sources > Text Source".
%textsource-line% | Complete content of the entire line from the text source window, which line number corresponds to the position of the file to be renamed in the file list. |
%textsource-line,x,y% | Letter x to letter y of the line from the text source window, which line number corresponds to the position of the file to be renamed in the file list. For example, %textsource-line,1,5% for the first 5 letters of the line or %textsource-line,3,7% for the letters at the character positions 3 to 7 of the line. |
You can find out more about the use of resources as well as some application examples for their use in the tutorial about the use and the usage options of resources in the FileRenamer.