Include/Exclude Rename
These functions use the '[ ]' or '] [' characters to identify the mode and to perform the operation. Care should be taken to assure that the selected filenames do not contain one or both of the characters. These functions are the most complex, but possibly the most powerful, of the multiple file rename functions.
The Include/Exclude functions work much like the Wildcard method except the capability exists to prepend and/or append, or exclude, characters on either end of the existing file name. Multiple rename passes through the selected files may be necessary to achieve the desired result.
See Renaming Multiple Files for methods to invoke this function, other multiple file rename functions and error handling.
Notes:
Initiation
The Wildcard Rename function is initiated on selected file(s) by:
Upon initiation, the Rename button label changes to Rename Files when more than one file is selected. A rename edit field appears under the Rename Files button and extends to the right edge of the FS/2 window. The first file in the selected list is presented in the edit field as the template to modify.
Exclude
The Exclude Rename function will truncate an explicit number of characters from either the start or end, or both, of a filename segment. The template consists of matched ] [ brackets with the remaining characters between the brackets used much the same as the Wildcard Rename function. Characters outside the brackets will be removed. When the template is modified, the Rename Files button will turn green (signifying the name field has been edited).
Consider the following template:
'xxxx]Aabb????[yyyy'
Another template example:
'xxx]???????[yyy.dat' or 'xxx]*[yyy.dat'
Either template shortens the name by at least the length of the leading three characters. The number of characters represented by xxx and yyy will be cut from the input names. There must be unique characters in the existing name where the ? (or *) occur or the function will attempt to create a duplicate file name.
Both the ] and [ characters must be used in the rename field. if there are no characters to truncate on one end or the other, specify:
The template of ]????????[.ext would shorten the name to the first eight characters. There must be unique characters in each file name to prevent a rename error.
In the example below, the template of 'my_pho]DSCF_???[_2004.jpg' will remove the first five characters regardless of what characters exist in the name, change the next five to 'DSCF_', use the next three existing characters (these make the file names unique), and remove the remaining characters, regardless of the likeness, or number, of the characters to those in the template.
Exclude
Rename Template
The Rename Files button will now be labeled "Exclude Rename". Clicking it will present a Exclude Rename Confirmation dialog window. It appears showing how the first file will be renamed in the Rename field and the template used is shown in the titlebar. Clicking the dialog Rename button will rename the files one at a time with each push. All selected files may be renamed in one step by clicking the Rename All button. The Skip button is pushed to skip the current file and the Edit button returns the mode to the edit field for further editing.
Exclude
Rename Confirmation
In the example shown, the selected files are renamed as shown below:
Exclude
Rename Files
Include
This function will append an explicit number of characters to either the start or end, or both, of a filename segment. Characters to the left of the [ are prepended and characters to the right of ] are appended. Again, the characters between the brackets are treated in accordance with wildcard rules.
In the example template below, the characters 'my_' are prepended and the characters '_2004' are appended. In the wildcard section between the brackets, the first five characters are renamed with 'photos' and the remaining characters are unchanged.
Include
Rename Template
The Rename Files button will now be labeled "Include Rename". Clicking it will present a Include Rename Confirmation dialog window. It appears showing how the first file will be renamed in the Rename field and the template used is shown in the titlebar. Clicking the dialog Rename button will rename the files one at a time with each push. All selected files may be renamed in one step by clicking the Rename All button. The Skip button is pushed to skip the current file and the Edit button returns the mode to the edit field for further editing.
Include
Rename Confirmation
In the example shown, the selected files are renamed as shown below:
Include
Rename Files
Some other template possibilities are:
Some characters of the filename may be replaced. A template of 'xxx[$???]yyy' when applied against these files:
123456789.txt 234567890.txt
the result will be:
xxx$234yyy.txt xxx$345yyy.txt
Another example. The source files to be renamed are:
foo.dat goo.dat
Enter this template (the existing ? characters must be different or a duplicate error will occur):
xxx[??file]yyy.dat
The result would be files renamed to:
xxxfofileyyy.dat xxxgofileyyy.dat