Skip to main content
Documentation & User Guides | FotoWare

Rename file sub action


Use this sub action to rename files that you send to a workflow.


The Rename file sub action makes it possible to rename files or change their file extension. The naming of files can be based on information in XMP or EXIF fields or specific file properties. It is also possible to add running numbers to files to ensure that all files are correctly renamed and are given a unique name. If files in your archive have the same filename as the file being renamed, but with a different file extension, the Rename file sub action can be configured to also rename these files. This functionality is useful for accompanying files such as text files containing metadata and other types of information.

To set up the automatic renaming of files, first decide whether the action should change the actual filename (choose the Change filename to option) or only the extension of the files (choose the Change file extension to option).

Changing the file name

When choosing to rename files, you may enter a new file name in the text field. When renaming a number of files in a single operation, you will have to add some extra information to avoid getting duplicate file names. This can be done in two ways. Either you can add a running number to the files, or you can add information from a file’s XMP or EXIF fields or file properties, provided that this information is unique for each file.

Adding running numbers

There are two ways to add a running number to file names. You can start numbering the files from number 1 and onwards, or you can prompt the user for a starting number. Please note that both methods require you to insert the %%INSFNUMBER operator in the Change filename to field. The %%INSFNUMBER operator is one of many dynamic operators. See the Dynamic operators part of this topic below.

By only inserting a dynamic operator

By inserting the %%INSFNUMBER operator into the Change filename to field, FotoStation will start renaming the files and adding the number 1 to the first file and continue on up until all files have been renamed. Note that you are free to choose where in the file name the running number should appear. It can be inserted first, last, or even in the middle of the new filename.

For instance, you can enter the following in the Change filename to field:


Thus, when processing files with the action, the renamed files will be called 1_Summer2014, 2_Summer2014, 3_Summer2014 and so on.

By prompting for the start sequence number

The advantages of prompting the user for a starting number is that you can choose to add leading zeros and you can choose which number should be the first running number in the renamed files.

When you select the Prompt for the start sequence number every time the action is started option, every time you run the action, FotoStation will display a dialog box that enables you to set the start number for the renaming sequence. Since the number directly substitutes the %%INSFNUMBER operator entered into the Change filename to field, it is a good idea to add a dash or an underscore after the static part and before the %%INSFNUMBER part of the filename, for example Newfile_%%INSFNUMBER.

This way, the underscore will separate the file name you choose from the running number, and if you for example choose 001 as the start number when prompted, the files will be renamed to Newfile_001, Newfile_002, Newfile_003, and so on. The files’ current extension will be preserved.

Dynamic operators

To rename files according to metadata field content or file information, you can click on the Insert code button. This will allow you to choose from all available XMP and EXIF fields and file properties to build a unique file name. For example, by choosing #005 Object Name under XMP fields, FotoStation will use the information in the Object Name as filename.

You may of course combine the contents of several fields, for instance like this:


This will combine the content of the Object Name field with the EXIF Date and Time field. Underscores or dashes can be inserted in the text field to separate one entry from another.

Note that all dynamic operators are available by clicking on the Insert code button. This means that you can also insert the running numbers dynamic operator %%INSFNUMBER by clicking on this button.

Tip: It is always a good idea to add a sufficient number of leading zeroes when renaming files using running numbers, since this will ensure that FotoStation sorts the files correctly when you choose to sort by file name, for example when viewing them in thumbnail view.

Including accompanying files in the renaming operation

Sometimes, files in an archive are accompanied by a second file that contains additional data about the file (metadata). Provided that such files, commonly referred to as “sidecar” files, have the same name as the file they accompany (extension aside), the Rename file sub action can rename the sidecar files automatically when renaming the master file. This is done by selecting the Include additional files with same name and other extension checkbox.

This way, when renaming for example image001.jpg, the sidecar files image001.txt, image001.inf and image001.doc will also be renamed. There is no limit to how many sidecar files a file can have; any file with the same name as the file being renamed will also be renamed.

Note that renaming of XMP sidecar files containing metadata is automatically handled by FotoStation whether this option is enabled or not.

Changing the file extension

The Rename file sub action can also be used for changing the extension of files. Keep in mind that changing the file extension may make the file open in another application, since both Windows and to some extent Mac OS rely on a file’s extension to determine which application it should open in.

To change the extension of the files processed by the action, click on Change file extension to and enter a file extension in the text field below, omitting the dot. Typically the file extension is three characters long, but you may make a longer or shorter extension if you like.

  • Was this article helpful?