Inviska Software

Free Open-Source Software for Windows, Mac and Linux

Inviska Rename Instructions

Most features of Inviska Rename are self explanatory, so this isn't intended to be an exhaustive description. Instead we'll give a general overview of the program and then cover a few features that aren't quite so obvious.

General Instructions

A basic rename operation can be performed by following the below steps.

  1. Open a directory by pasting the path into the address bar, by going to File -> Open Directory, or by browsing to the directory by double clicking folders in the file list.
  2. Check the boxes next to the rename operations you wish to perform and specify the relevant information.
  3. Check the Preview pane to confirm that the files will be renamed as you intended.
  4. Press the Rename button in the bottom left and then click Yes to perform the rename operation.

We'll now look at some specific case studies to illustrate the steps involved.

Case Study - Renaming Photos

You've been on a holiday to Spain and you want to rename you photos and videos from names like DSC07760.JPG and MOV07647.MP4 to names like "Spain Holiday - 073.jpg" and "Spain Holiday Video - 34.mp4". First let's rename the photos.

  1. Open the directory containing the photos by pasting the path into the address bar, or by going to File -> Open Directory.
  2. Check the Replace Name With box and enter "Spain Holiday - " into the box.
    Replace Name With Spain Holiday -
  3. Under Rename click Files With Extension and enter "JPG" into the box.
    Files With Extension JPG
  4. Click the Extension tab, check the Replace Name With box and enter "jpg" into the box.
    Replace Name With Spain jpg
  5. Click the Numbering tab and click Number After Filename.
    Number After Filename
  6. Click the Rename button and then click Yes.

We'll now rename the videos by following a similar procedure.

  1. Check the Replace Name With box and enter "Spain Holiday Video - " into the box.
  2. Under Rename click Files With Extension and enter "MP4"
  3. Click the Extension tab, check the Replace Name With box and enter "mp4" into the box.
  4. Click the Numbering tab and click Number After Filename.
  5. Click the Rename button and then click Yes.

After performing these operations the files will look like this. Other types of files can be renamed by following a similar procedure.

Case Study - Renaming Music Files Using Tags

You have some mp3 files which have been tagged with the track information, but have been given uninformative filenames like "track01.mp3". You want to give the files more useful names based on the ID3v2 tag information. Here we'll see how to rename the files to the format
"Artist - Album - Track - Title.mp3".

  1. Open the directory containing the music files by pasting the path into the address bar, or by going to File -> Open Directory.
  2. Check the Replace Name With box and enter "[$Mu-Artist] - [$Mu-Album] - [$Mu-Track] - [$Mu-Title]" into the box. Tag information can also be entered through the Tags menu, so you don't have to remember the individual tag codes (see the "Using Tags" section below).
  3. Under Rename click Files With Extension and enter "mp3". This step can be skipped if the folder contains only mp3 files.
  4. Click the Rename button and then click Yes.

This screenshot illustrates the above process. For further details on renaming files with tags, and for a list of all available tags, see the "Using Tags" section below.

Case Study - Ordering Photos From Two Cameras Using Exif Tags

You went on a holiday to Spain and took two different cameras. You want to rename the photos from the two cameras so they appear in the order they were taken. We'll see how to do this below using the Exif data embedded in the photos. This example assumes that the date and time were correctly set on both cameras.

  1. Open the directory containing photos from the first camera by pasting the path into the address bar, or by going to File -> Open Directory.
  2. Check the Replace Name With box and enter "[$Ex-DateTime] A". The 'A' at the end is included to eliminate possible naming conflicts.
  3. Under Rename click Files With Extension and enter "JPG". This step can be skipped if the folder contains only jpg files.
  4. Click the Numbering tab and click Number After Filename. This is again to eliminate the possibility of a naming conflict, since shots taken in burst mode could end up with the same name. Following this step the filenames will appear as shown in this screenshot.
  5. Click the Rename button and then click Yes.
  6. Open the directory containing the photos from the second camera.
  7. Check the Replace Name With box and enter "[$Ex-DateTime] B" (note the 'B' at the end).
  8. Under Rename click Files With Extension and enter "jpg".
  9. Click the Numbering tab and click Number After Filename.
  10. Click the Rename button and then click Yes.

After this you can merge the photos from the two cameras into a single directory and, since they are named with the date and time they were taken, they will appear in the correct order. However, names like "2017-07-25 11;48;45 A054.JPG" aren't very attractive, so we'll finish by renaming the merged photos with a more pleasing and useful name:

  1. Open the directory containing the photos.
  2. Check the Replace Name With box and enter "Spain Holiday - " into the box.
  3. Under Rename click Files With Extension and enter "JPG" into the box.
  4. Click the Extension tab, check the Replace Name With box and enter "jpg" into the box.
  5. Click the Numbering tab and click Number After Filename.
  6. Click the Rename button and then click Yes.

With that we've successfully renamed the photos from the two cameras so that the merged photos will appear in the order the pictures were taken.

Using Tags to Insert Music, Photo and File Information

The tags featurs allows you to rename files using meta information stored in the files, for example track information in music files or Exif information in digital photographs. Tag codes can be used in the following boxes:

To insert a tag code, click in one of the boxes at the position you want the tag be inserted:

Inserting Tags

From the Tags menu select the tag you want to insert:

Inserting Tags

The tag code will be inserted at the position of the cursor and the Preview table will be updated with the tag information:

Inserting Tags

You don't have to use the Tags menu, as you can type the tag code manually if you find that more convenient. Tag codes are case insensitive, so [$mu-title] and [$MU-TITLE] will both be recognised as [$Mu-Title].

Music Tag Codes
Tag Code Description
[$Mu-Title] Title of music track.
[$Mu-Artist] Performing artist.
[$Mu-Album] Album from which track originates.
[$Mu-Track] Track number in album.
[$Mu-Year] Year song was produced.
[$Mu-Genre] Genre of music.
[$Mu-Comment] Comment entered by encoder of file.
[$Mu-RunTime] Track length in the format mm.ss.
e.g. a 4min25sec track would insert 04.25.
[$Mu-Channels] Number of channels as a digit.
e.g. a stereo track would insert 2.
[$Mu-SampleRate] Sample rate in Hz with no unit.
e.g. a 44100 Hz rate would insert 44100.
You can add the unit with [$Mu-SampleRate] Hz.
[$Mu-BitRate] Bitrate in kbps with no unit.
e.g. a 320 kbps bitrate would insert 320.
You can add the unit with [$Mu-BitRate] kbps.
Exif Tag Codes
Tag Code Description
[$Ex-CameraMake] Manufacturer of camera.
[$Ex-CameraModel] Model of camera.
[$Ex-FNumber] F-number as a number with no unit.
e.g. f/3.2 bitrate would insert 3.2.
You can add the unit with f-[$Ex-FNumber].
[$Ex-ISOSpeed] ISO speed as a number with no unit.
e.g. ISO 200 would insert 200.
You can add the unit with ISO [$Ex-ISOSpeed].
[$Ex-ExposureTime] Exposure time in seconds as a fraction with no unit.
e.g. a 1/100s exposure time would insert 1/100.
e.g. a 20s exposure time would insert 20.
[$Ex-ExposureTimeDec] Exposure time in seconds as a decimal with no unit.
e.g. a 1/320s exposure time would insert 0.003125.
e.g. a 20s exposure time would insert 20.
[$Ex-FocalLength] Focal length in mm with no unit.
e.g. a 50mm focal length would insert 50.
You can add the unit with [$Ex-FocalLength]mm.
[$Ex-Program] Program used to take the photo.
e.g. Example modes are Normal, Landscape, Portrait.
[$Ex-PixelDimX] Horizontal image resolution in pixels.
e.g. a 5152x2896 image would insert 5152.
[$Ex-PixelDimY] Vertical image resolution in pixels.
e.g. a 5152x2896 image would insert 2896.
[$Ex-DateTime] Date and time the picture was taken in the format
YYYY-MM-DD HH.MM.SS e.g. 1999-12-31 23.59.59.
[$Ex-Date] Date the picture was taken in the format
YYYY-MM-DD e.g. 1999-12-31.
[$Ex-Time] Time the picture was taken in the format
HH.MM.SS e.g. 23.59.59.
[$Ex-DateYYYY] Four digit year the picture was taken, e.g. 1999.
Can be used to make your own date format, e.g US format:
[$Ex-DateMM]-[$Ex-DateDD]-[$Ex-DateYYYY] = 12-31-1999.
[$Ex-DateYY] Two digit year the picture was taken, e.g. 99.
Can be used to make your own date format, e.g US format:
[$Ex-DateMM]-[$Ex-DateDD]-[$Ex-DateYY] = 12-31-99.
[$Ex-DateMM] Two digit month the picture was taken, e.g. 12.
Can be used to make your own date format, e.g US format:
[$Ex-DateMM]-[$Ex-DateDD]-[$Ex-DateYYYY] = 12-31-1999.
[$Ex-DateDD] Two digit day the picture was taken, e.g. 31.
Can be used to make your own date format, e.g US format:
[$Ex-DateMM]-[$Ex-DateDD]-[$Ex-DateYYYY] = 12-31-1999.
[$Ex-TimeHH] Two digit hour the picture was taken, e.g. 23.
Can be used to make your own time format:
[$Ex-TimeHH]-[$Ex-TimeMM]-[$Ex-TimeSS] = 23-59-59.
[$Ex-TimeMM] Two digit minute the picture was taken, e.g. 59.
Can be used to make your own time format:
[$Ex-TimeHH]-[$Ex-TimeMM]-[$Ex-TimeSS] = 23-59-59.
[$Ex-TimeSS] Two digit second the picture was taken, e.g. 59.
Can be used to make your own time format:
[$Ex-TimeHH]-[$Ex-TimeMM]-[$Ex-TimeSS] = 23-59-59.
[$Ex-TimeSubSec] Three digit sub-second the picture was taken. Note that most camera manufacturers do not encode a sub-second time value. If no value is encoded 000 will be used.
File Attribute Tag Codes
Tag Code Description
[$At-CreatedDateTime] Date and time the file was created [1] in the format
YYYY-MM-DD HH.MM.SS e.g. 1999-12-31 23.59.59.
[$At-CreatedDate] Date the file was created [1] in the format
YYYY-MM-DD e.g. 1999-12-31.
[$At-CreatedTime] Time the file was created [1] in the format
HH.MM.SS e.g. 23.59.59.
[$At-CreatedDateYYYY] Four digit year the file was created [1], e.g. 1999.
[$At-CreatedDateYY] Two digit year the file was created [1], e.g. 99.
[$At-CreatedDateMM] Two digit month the file was created [1], e.g. 12.
[$At-CreatedDateDD] Two digit day the file was created [1], e.g. 31.
[$At-CreatedTimeHH] Two digit hour the file was created [1], e.g. 23.
[$At-CreatedTimeMM] Two digit minute the file was created [1], e.g. 59.
[$At-CreatedTimeSS] Two digit second the file was created [1], e.g. 59.
[$At-ModifiedDateTime] Date and time the file was modified in the format
YYYY-MM-DD HH.MM.SS e.g. 1999-12-31 23.59.59.
[$At-ModifiedDate] Date the file was modified in the format
YYYY-MM-DD e.g. 1999-12-31.
[$At-ModifiedTime] Time the file was modified in the format
HH.MM.SS e.g. 23.59.59.
[$At-ModifiedDateYYYY] Four digit year the file was modified, e.g. 1999.
[$At-ModifiedDateYY] Two digit year the file was modified, e.g. 99.
[$At-ModifiedDateMM] Two digit month the file was modified, e.g. 12.
[$At-ModifiedDateDD] Two digit day the file was modified, e.g. 31.
[$At-ModifiedTimeHH] Two digit hour the file was modified, e.g. 23.
[$At-ModifiedTimeMM] Two digit minute the file was modified, e.g. 59.
[$At-ModifiedTimeSS] Two digit second the file was modified, e.g. 59.

[1] - The "Created" date refers to the date the file was created on the disk it currently resides, and can differ from the date the file was originally created. If you make a copy of a file, the "Created" date of the copy will be set to the date you made the copy, rather than the date the original file was created.

Making All Exif Tags Available for Insertion

By default only the most useful Exif tags are available for substitution, but all Exif tags shown in the File Properties dialog can be made available for insertion. To do this you must enable the setting Load all Exif tags in the Preferences. As noted in the option, this is not recommended if you don't need the extra tags as it significantly increases the time taken to load Exif information.

Enabling Exif Advanced Mode

When this option is available the Exif tags menu will be divided into seven sub menus, as shown below. For reference you can see a full list of Exif tag codes here.

Exif Advanced Mode

Viewing and Editing Tag Information

You can view tag information by right clicking on a file in the Current table and selecting View File Properties & Tags.

View File Properties & Tags

If there are music tags present in the file they will be shown in the Media tab, while Exif tags will be shown in the Exif tab.

File Properties Dialog

Music tags can be modified by typing a new value in the box and then clicking Apple Changes. Note that tag modifications may fail if the file is open in another application, so it's best to ensure the file isn't currently open.

Re-Ordering Files for Numbering

Files can be re-ordered by highlighting rows and using the keyboard shortcuts Ctrl+Shift+Up and Ctrl+Shift+Down, or on the Mac Command+Shift+Up and Command+Shift+Down. The keyboard shortcut is generally the simplest method, but you can also enable a side bar with up/down arrows for moving files up and down the list. This is disabled by default but can be enabled in the Preferences:

Enable Side Bar

In the below screenshot we can see that episode 5.5 appears before episode 5 in the file list. If you were to renumber the files they would come out in the wrong order, with 5.5 coming before 5:

Out of Order Files

You can correct this by shifting 5.5 down in the file list using the Ctrl+Shift+Down shortcut or down arrow:

Re-Ordered Files

Multiple lines can be selected using the Ctrl key. For example, let's imagine we're renaming the below car pictures, but we want the Ferrari, Lotus, McLaren pictures to appear first in the list. You simply select these rows and hold down the Ctrl+Shift+Up keyboard shortcut to move them to the top:

Moving Multiple Files

Following this they will appear at the top of the list:

Moving Multiple Files

Using Regular Expressions

Regular expressions allow you to perform more advanced renaming tasks that would not be possible using only the basic settings. Using regular expressions, you can search for sequences of characters, which can then be removed, replaced, reordered or substituted into other parts of the name. We'll briefly describe how to use the regular expression feature and then look at some examples of regular expression rename operations. If you're new to regular expressions, you might want to skip ahead to the examples to see what they can do and, if you think they'll be useful, you can go back and read how to use them.

To avoid confusing casual users, the regular expression functionality is disabled by default, so must first be enabled in the Preferences under RegEx. You can enable up to three RegEx tabs to operate on the filename and one RegEx tab to operate on the extension:

Enabling Regular Expression Tabs

Inviska Rename uses Perl-compatible regular expressions. A full regular expressions tutorial would be beyond the scope of these instructions, but below is a list of common elements that will be useful in rename operations. These elements can be combined to produce more complex expressions that can precisely match the text your searching for. The below should be enough for most rename operations, but if you require further information there are many websites about regular expressions, such as Regular-Expressions.info. There are various regular expression implementations (POSIX, Java, Vim, etc), so when reading tutorials it's important to look at the information for Perl regular expressions.

Element Description
. Matches any single character.
\d Matches a single digit 0-9.
\D Matches a single non-digit character, i.e. any character but the digits 0-9.
\w Matches a single alphanumeric character a-z, A-Z, 0-9 or _ (the underscore character).
\W Matches a single non-alphanumeric character, i.e. anything but a-z, A-Z, 0-9 or _.
\s Matches a single whitespace character.
\S Matches a single non-whitespace character, which in filenames is anything but space.
* Matches the preceding element zero or more times.
e.g. '.*' matches a string in single quotes of any length, so 'hello' 'goodbye' and '' would all be matched.
+ Matches the preceding element one or more times.
e.g. '.+' matches a string in single quotes of at least one character in length, so 'hello' would be matched but not ''.
? Matches the preceding element zero or one times.
e.g. colou?r would match both the English UK and English US spellings of colour/color.
$ Matches text at the end of the string/filename.
e.g. \d\d$ matches a two digit number at the end of the filename.
^ Matches text at the start of the string/filename.
e.g. ^\d\d matches a two digit number at the start of the filename.
[ ] Matches a single character contained within the square brackets.
e.g. [abc] matches a, b or c.
e.g. [a.c] matches a, . or c. Note that . is treated as a normal character when used in square brackets.
e.g. [a-z] matches any character in the range a-z.
e.g. [abcx-z] matches a, b, c, x, y or z.
[^] Matches a character not contained within the brackets.
e.g. [^abc] matches any single character apart from a, b and c.
e.g. [^a-z] matches any single character apart from those in the range a-z.
{n} Matches the preceding element precisely n times.
e.g. \d{5} matches a five digit number.
{n, m} Matches the preceding element between n and m times.
e.g. \d{4,6} matches a number that's four, five or six digits in length.
\ Causes the following character to be treated as a normal character rather than a metacharacter.
e.g. \[ causes [ to be treated as a normal character rather than as an opening square bracket.
e.g. \[.*\] matches an opening square bracket, zero or more characters, then a closing square bracket.
| Matches the element preceding the character OR the element after the character.
e.g. a|b matches the character a or b.
e.g. \[.*\]|\(.*\) matches a block of text enclosed in square brackets OR a block of text enclosed in brackets.
() Defines a subexpression.
e.g. theat(re|er) matches the English UK and English US spellings of theatre/theater.
Subexpression are also used to insert individual elements of the match into the filename, as we'll see below.
(?i) Makes the expression or subexpression case insensitive, overriding Inviska Rename's case-sensitivity setting.
e.g. ab((?i)cd)ef matches "abcdef" where the "ab" and "ef" must be lowercase, but the "cd" can be any case.

By default the regular expression searches from the start of the filename, but you can use the Search Start Pos to specify a start position in the filename from which to begin searching.

Specifying Search Start Position

Once you have written your regular expression, you'll want to be able to use the matched text in your rename operations. This is achieved by entering $0 into any of the boxes on the RegEx tab. To insert text matched by subexpression 1-9 you use $[1-9]. Note that Inviska Rename does not implement named subexpressions. This can be done if there's demand for it, but it seemed excessive and unnecessary.

Note also that the Case Sensitive Comparisons setting (the 'a' button in the top right of the toolbar) DOES apply to regular expressions, so if Case Sensitive Comparisons are disabled, the regular expression will not be case sensitive. When using regular expressions, it would perhaps be best to have Case Sensitive Comparisons enabled, since the regular expressions themselves offer greater control over case sensitivity. Specifically, you can use the (?i) modifier to make all, or part, of the regular expression case insensitive.

Regular Expression Example

Imagine you're running a furniture store and have images of all your products. Each product is identified with a five digit Product ID, which is included in the image filename. However, the files have not been named in a uniform manner, so the Product IDs occur at different places in each filename, as shown below.

Renaming Using Regular Expressions

You want to rename these files in a more consistent manner so that the Product ID is in the same place in all filenames. To achieve this we first enter a regular expression into the Regular Expression box of the RegEx Name 1 tab. The expression we will use is \d{5}, which matches a five digit number. We can then use this to rename the files using the product ID in a variety of ways. For example, we can enter Product ID $0 into the Replace Name With box to rename the files in the format "Product ID xxxxx":

Renaming Using Regular Expressions

Alternatively, we could retain the existing filenames, but insert the Product ID at the start of each name by entering $0 - in the Insert At Start box:

Renaming Using Regular Expressions

Imagine our product range increases and we start using six digit Product IDs. We can add an extra 0 to the start of the existing Product IDs by entering 0$0 in the Replace Match With box:

Renaming Using Regular Expressions
Using Subexpressions

Imagine we have some files that have been named starting with the date in the format DD-MM-YYYY. This date format leads to the files being listed out of order, so we want to change the date format to YYYY-MM-DD. To achieve this we use the regular expression (\d\d)-(\d\d)-(\d\d\d\d). To explain this, the expression \d\d-\d\d-\d\d\d\d would match the date format used in the file, but we have also added brackets around each data element to create three subexpressions. This allows us to access the individual date elements using $1, $2 and $3. We can therefore enter $3-$2-$1 in the Replace Match With box to replace the DD-MM-YYYY dates with YYYY-MM-DD dates:

Renaming Using Subexpressions

Alternatively, we could change the whole name format by entering Meeting Minutes - $3-$2-$1 into the Replace Name With box:

Renaming Using Subexpressions
Using Multiple Regular Expressions

Imagine we have some video files which have been named with a group name in square brackets at the start, and file information in brackets at the end:

Using Multiple Regular Expressions

We want to create a rename that strips out the group name and file information. In the RegEx Name 1 tab we can use the regular expression \[.*\]  (Note: there's a space character at the end) to match the group name. We can then use the Replace Match With to replace this text with nothing (i.e. remove it):

Using Multiple Regular Expressions

We can then go to the RegEx Name 2 tab and enter the regular expression  \(.*\) (Note: there's a space character at the start). We again use a blank Replace Match With to remove this text:

Using Multiple Regular Expressions

This task could be performed with the basic rename options, but the advantage of using regular expressions is that we can save these rename settings and apply them to other files. The rename operation will still work even if the group name and codec information are different:

Using Multiple Regular Expressions
Getting Help Writing Regular Expressions

If you're having trouble writing a regular expression, you can ask for help on sites like Stack Exchange's Super User. You're far more likely to get help if you show that you've tried to solve the problem yourself before asking. Explain what you're trying to match and include your attempt at a writing a regular expression, and somebody will likely tell you how to fix it.

Invalid Character Substitution

On Windows the characters \/:*?"<>| cannot be used in filenames, while on Linux and Mac the / character cannot be used. However, these characters can appear in meta tags, for example a song title that ends in a question mark. If a file is renamed using a tags that contains invalid characters, the rename operation will fail. To avoid this, Inviska Rename automatically substitutes invalid characters with an alternative character or string. Under the default settings similar Unicode characters are used to replace the invalid characters, as shown in the below table. You can change the substituted characters to meet your own needs. The substitution need not be a single character, and can be a string, for example you could replace colon with " -" (space dash).

Invalid Character Substitution On Windows

On Linux and Mac, only the slash character is substituted by default. However, the option to substitute other characters is left in place for users who wish to keep their filenames Windows compatible. The Linux and Mac versions contain an additional button that populates the table with the default character substitutions for Windows.

Invalid Character Substitution On Linus

If the substitute character is the same as the invalid character, no substitution will take place for that character. As it can be difficult to see the difference between the invalid ASCII characters and the substitute Unicode characters, the characters are coloured to indicate when substitution is enabled. In the above left screenshot substitution is only enabled for the slash character, while in the right screenshot substitution is enabled for all characters. This highlighting only takes place on Linux and Mac, since on Windows character substitution is always active for all invalid characters.

Postscript