Bulk Rename Utility - Manual PDF
Bulk Rename Utility - Manual PDF
Bulk Rename Utility - Manual PDF
Table of Contents
Overview
Getting Started
................................................................................................................................... 12
................................................................................................................................... 17
7 Context Menu
................................................................................................................................... 18
................................................................................................................................... 21
Additional Features
25
Support
40
41
43
44
Index
47
Copyright TGRMN Software 2008-2016
Overview
Overview
Bulk Rename Utility is a software utility which allows you to rename multiple files and folders, based upon
flexible criteria. For example, you can add a prefix or suffix to a file, or you can change three letters with four
other letters in a filename. There are lots of ways to manipulate file and folder names.
Bulk Rename Utility supports many flexible renaming criteria, including:
Rename files and/or folders
Support for Regular Expressions
Change the file name or use a fixed filename
Convert the extension to lower case, upper case, title case - or replace it - or add a secondary extension or remove it
Replace text with other text
Add a fixed prefix or suffix
Add text to the middle of a name
Move text to the start/end/middle of a name
Remove the first n characters
Remove the last n characters
Remove from the nth character to the nth character
Remove a list of characters
Remove all digits, characters or symbols
Remove double-spaces
Crop text before or after a fixed character or text (or from anywhere in a name using a wildcard)
Change to upper case, lower case, title case, sentence case - all with user-defined exceptions
Auto-number files, with a prefix or suffix, and with a predefined minimum-length if required
Prefix or suffix the filename with various dates (date-modified, accessed, created, or today's date), in many
different formats with variable separators
Append the folder name to the file (with multiple levels)
Store your frequently-used renaming criteria as Favourites
Copy or move the renamed files to a new location
Set or clear the Windows attributes on the files (read-only, archived, system, hidden)
Rename files according to a list
Process files in folders and also sub-folders very quickly
Change file or folder created, modified and accessed timestamps
Convert Roman numerals to upper or lower case
Log all activity to a text-file
Create an UNDO batch file
Extract certain EXIF tags from JPEG, TIFF, .NEF, .CR2 and and .CRW files
Extract certain ID3 tags (V1 and V1.1) from MP3 files
Drag files directly from within Windows Explorer
Support for renaming scripts using Javascript
All of these changes automatically ignore the file name extension be default. However, you can change the
extension case to a fixed extension, or add a "secondary" extension, and you can also remove an extension.
You can choose to ignore extensions within folder names - e.g. treat Program.Files as a normal filename - but
not filenames.
The application supports Favourites, which allows quick access to frequently-used renaming configurations.
Directory recursion is also fully supported, allowing you to process folders and sub-folders.
If you have suggestions for enhancements or improvements, please get in touch.
Getting Started
Bulk Renam e Utility is straightforward to use.
There are four simple rules to follows:
1.
2.
3.
4.
Only complete the boxes you are interested in. For example, don't assume you have to put something in
the Regular Expressions box, or the New Location box, etc.
You have to select files to rename from the file list before the Rename button is enabled.
The "new name" column will always be shown in the list, so you can experiment until you get the desired
result before actually committing the changes.
Almost all the boxes on the screen are ONLY for affecting the file name, NOT the extension. The only box
which affects the extension is box 11.
So for example, if you just want to change the filename case to upper case, all you need to do is:
1.
2.
3.
And that's it! No worrying about regular expressions, new folders, auto-numbers, dates etc.
You only need to use the boxes you are interested in. Don't want to move the files to a new folder? Leave
the New Location fields blank. Don't want to change the filename case? Leave the Case fields as their default
values.
It is simple, only use the boxes you are interested in.
RegEx (1)
Regular Expression. It allows you to enter a regular expression Match and Replace. More details can be found
here. If you are not using Regular Expressions then both of these fields must be left blank. Do not confuse
these fields with the Replacements fields found elsewhere on the screen (Repl., see below).
Include Ext.: select this option to apply the regular expression to the entire name and extension.
Name (2)
Fine Name. It allows you to manage the file name.
Name drop-down:
Keep - ensure that the original filename is not changed (default).
Remove - completely erase the filename from the selected items.
Fixed - specify a new filename in the box for all selected items. Only really useful if you're also using the
Numbering section.
Reverse - reverse the name, e.g. 12345.txt becomes 54321.txt.
Replace (3)
Replacement. It allows you to replace occurrences of one text string with another.
This section consists of two controls. You must specify the text you wish to Replace and the text you wish to
replace it With. It is possible to find a text string and replace it with an empty string, or with a shorter string,
or with a longer string. You may also specify whether or not you want the "find" to be case-sensitive using
Match Case. Note that the text is always replaced with the text you specify, including any specific text case.
Case (4)
Changing of case. Allows the capitalization of file and/or folder names to be changed.
Case drop-down:
Same - leave the original capitalization intact.
Lower - convert all letters in the name(s) to lower-case.
Upper - converts all letters in the name(s) into capitals.
Title - converts all the words in the selected items to initial caps. A word is generally defined as a string of
letters proceeded by a space or a bracket. So "joe public.txt" would become "Joe Public.txt" but "joe-public.
txt" would become "Joe-public.txt".
Sentence - converts all the words in the sentence to sentence format. This means capitalizing the first letter
of the first word after every full stop (.). So "hello EVERYONE. MY name IS FreD.txt" would become "Hello
everyone. My name is fred.txt"
Exceptions: You can also enter a list of "exceptions", separated by colons. So for example if you entered PHP:
ASP:doc then any occurrence of php or ASP (or pHP or aSp) would be converted to upper-case, and every
occurrence of DOC (or DoC) would become doc.
Remove (5)
Removing parts of a filename.
This section consists of several options for removing parts of a filename. Note that these do not apply to the
file extension, just the name.
First n - Remove the first n characters from the name. E.g. removing the first 2 characters from "Joe Public.
txt" will result in "e Public.txt".
Last n - Remove the last n characters from the name. E.g. removing the last 2 characters from "Joe Public.
txt" will result in "Joe Publ.txt".
From/to - Remove a string of text, e.g. from the 6th to the 9th characters.
Chars - Remove occurrences of characters from the name. E.g. typing "QW:#" will result in all occurrences of
Q, W, colon and hash being removed.
Words - Remove occurrences of words (separated by spaces).
Crop - Remove any text which occurs before (or after) a specific character or word. See note below.
Digits - Remove all occurrences of the digits 0-9 from the filename.
High - Remove high-ASCII characters (chars from 128 to 255).
Trim - Remove leading and trailing spaces.
D/S - Remove occurrences of double spaces, and replace them with single spaces.
Accent - Remove accented characters and replace them with non-accented versions. File names may contain
accented characters, e.g. File names might contain and . Bulk Rename Utility provides a facility to replace
accented characters with non-accented if needed.
Chars - Remove all characters.
Sym - Remove all symbols.
Lead Dots - Remove the . or .. from the front of filenames (useful if you've copied from a Linux/Unix system).
Note: When you use the "crop" option, you have the ability of specifying a "special" value using the wildcard
(*). This will remove the specified string, and any characters occupied by the wildcard. So for example,
specifying [*] would convert "Hello[ABC] Joe" to just "Hello Joe", as it has removed the two square brackets
and everything between.
Move/Copy (6)
Move a section of text to a different place.
This section allows you to move or copy a fixed number of characters form one part of the string (start or end)
to another (start, end or position). You could do this with Regular Expressions, but this gives you an
alternative. So for example, if all your filenames end with a unique 6-digit sequence code, and you'd rather
have this at the start of the filename, then this is the simplest way to achieve it. You can also specify a
separator in the field Sep.
Add (7)
Add a fixed prefix or suffix to the filename, and certain Exif and ID3 tags.
This section allows you to add a fixed text string to the start of the filename (Prefix) and/or a fixed text string
to the end of a filename (Suffix). Useful for renaming MP3 files, where you can prefix all the filenames with the
artist or album name. You can also insert a text string at any point in the filename.
You may also choose to add a "Word Space". This will insert a space before any capital letter (except the first
character), unless there's a space already there. So, the name "MyHoliday Photographs" would become "My
Holiday Photographs".
Note: If you are processing JPEG files, you can also extract and add certain EXIF tags.
These are specified using substitution tags, which you key into the Prefix, Insert or Suffix boxes. The tags
supported are:
%a - Aperture
%c - Comments
%e - Exposure
%f - Focal Length
%xb - Exposure Bias
%ma - Camera Make
%mo - Camera Model
Note: If you are processing MP3 files, you can also extract certain ID3 tags (n.b. only V1 and V1.1 ID3 tags
are supported). These are specified using substitution tags, which you key into the Prefix, Insert or Suffix
boxes. The tags supported are:
%r - Artist
%l - Album
%t - Title
%k - Track Number
Note: You can also specify %z to include the file size (using the format currently specified on the Options
menu)
necessarily the most recent in time. This is purely to retain the same behaviour as previous versions of Bulk
Rename Utility.
Numbering (10)
Add sequential numbers.
This section allows you to sequentially number a group of files. Several criteria exist:
Mode - Specify whether you want the number to be appended to the start of the filename, or at the end of
the filename, both or insert at a certain position.
Start - Specify a starting number for the numbering.
Incr. - The number by which you want each file name number to be incremented.
Pad - The minimum number of digits occupied by the numeric element. Bases 1-36 will be padded with
leading zeros; the a-z and A-Z options will be padded with "a" or "A" as appropriate.
Sep. - A character or characters that you wish to be inserted between the filename and the number. If you
enter the special character ":" (colon) in the Sep. box then this will be replaced with the auto-number. So a
separator value of ABC:DEF: would result in ABC1DEF1, ABC2ABC2 etc.
A common scenario would be:
Mode = Suffix
Start = 1
Increment = 1
Pad = 4
Separator = This would result in filenames with suffixes of -0001, -0002, -0003, -0004 etc.
Break - Reset the auto-number when the nnn character changes. e.g. enter 4 to cause the number to reset
when the 4th character of the NEW name changes.
Folder - Reset the auto-number upon a change of subfolder.
Type - You can choose to append the auto-number in any numeric base, from base 2 to base 36. e.g. a
value of 26 in base 16 would be appended as 1A. Or even use letters, e.g. A-Z or a-z.
Roman Numerals - Convert Roman Numerals to upper of lower case. For example, if you had a file called
"Beethoven's niNTH syMPHONY part iii", you might want to use Title Case to format the filename, but this
would impact the "iii". Use this control to handle the Roman Numeral element.
Extension (11)
Change case of the file name extension.
Same - Leave the original capitalization intact.
Special (14)
On top of the above renaming options, there are 4 additional special actions that can be performed on files.
These actions are also accessible via the "Special" menu and they are:
Change File Attributes
If you chose the Complete installation option then the easiest way to access the Bulk Rename Utility dialog is from
Windows Explorer itself. Simply highlight the folder or folder containing files which you wish to rename, and then either
right-click or press shift Function Key 10 and select "Bulk Rename" from the context menu. Also, if you've previously
saved the renaming criteria to a Favourite file then you can double-click that Favourite file to launch the application.
10
Select the folder which contains the objects you wish to rename. If required, you may also specify a file
filter to restrict your list.
Enter the renaming criteria. The column beside the filename will show you what the new file name will
become.
Select the files you wish to process (use CTRL or SHIFT to select multiple files).
Hit the Rename button. (This button is not enabled unless you have selected one or more files/folders to
rename)
Note: You can sort the file list using the column headers, as you would do in Explorer.
The files will always be processed in the displayed sequence - useful when you're using the Numbering
facility.
The renaming criteria are processed from left to right, according to the number listed against each
section
So for example, a text replace will be performed before a change of case. The specific operations are as
follows:
1) Apply any fixed name changes from an imported text file
2) Apply any Regular Expression reformatting [ RegEx (1) ]
3) Remove any file name, or use a fixed name [ File (2) ]
4) Perform any text substitutions [ Repl. (3) ]
5) Perform Character Translations [ Special (14) ]
6) Perform any changes of case [ Case (4) ]
7) Remove n digits from the start, middle or end of the filename, and optionally remove certain characters,
and/or all characters, and/or all digits and/or all symbols and/or all high-ascii characters [ Remove (5) ]
8) Move any text from the start, middle or end of the filename to the start, middle or end of the filename
[ Move/Copy (6) ]
9) Add any prefixes or suffixes, or apply text to the middle of the filename. Suffixes are added at the end of
the filename, i.e. before any file extension [ Add (7) ]
10) Apply any "auto-date" text as a prefix or suffix. "Sep" is the text to insert between the filename and the
date; "Seg" is the separator between the day, month, year, hour, minute and second segments. Or you can
use a custom date format. [ Auto Date (8) ]
11) Add the containing folder name as a prefix or a suffix, with a user-defined separator [ Append Folder
Name (9) ]
12) Perform any auto-numbering [ Numbering (10) ]
13) Make any changes to the case of the file extension, or change the extension [ Extension (11) ]
14) Process Javascript code [ Special (14) ]. This is the last step.
The selected files will be renamed according to your selection criteria. You can select multiple files by holding
down the SHIFT or CTRL keys. If there are any problems with the rename operation then you will be given the
option to roll back (undo) the operation.
Remember - you can always preview the new name in the file list. This allows you to refine your criteria before
actually renaming the files.
To preserve your renaming criteria for the next time you use the utility, save the renaming criteria to a
11
Favourite file.
You can use the Reset button to reset all your renaming criteria back to the default values (or the smaller R
buttons to just reset one group).
Changes to File Timestamps and/or to File Attributes are also applied if specified in Special (14).
12
Actions Menu
The actions menu provides you with a variety of shortcuts to speed up common tasks, and these are
described below.
Select All (Ctrl+A)
This will select all the files and folders in the file-list window.
Deselect All (Ctrl+D)
This will de-select all the files and folders in the file-list window.
Invert Selection (Ctrl+I)
Any entry which is currently selected will be de-selected, and vice-versa. Handy for two-pass renames, where
you want to rename a whole batch of files in one go, then rename "everything else" in another go.
Select from Clipboard
If you have a list of file names on the clipboard (such as the output from DIR /B) then the software will try to
select files which match the names from the clipboard.
Jump to Path (Ctrl+J)
This option will display a window, allowing you to type or select a full pathname to navigate to. The path must
exist (it will be validated) and it must map to a drive letter. UNC paths are not supported.
Rename Object Manually (F2)
Enable manual name editing of the selected object in the file list.
Refresh Files (F5)
This will refresh the contents of the right-hand file-list window.
Refresh Tree (Ctrl+F5)
This will refresh the contents of the left-hand tree window. Note that you can refresh the contents of the
selected branch by collapsing and re-expanding the branch.
Show/Hide Tree (F11)
This will hide or show the folder "tree". This is useful if you have located your folder and you are now doing
lots of work in the one folder. The "tree" can be removed to give you more space. Note: The tree will always
be visible at program startup, even if it was hidden when you closed the program.
Zoom (F8)
This allows you to launch a new window to edit the current text field. Space on the screen is limited, and
some fields are small, so this option allows you to enter long text with ease. You can type text into the new
window, in a larger font, and the text will then appear in the field on the main screen.
Random Sort
This allows you to sort the file list in a random sequence. Useful if you want to create a slideshow in a random
display-sequence. Once you've sorted in random order, apply a numeric auto-number prefix to keep the list in
that order.
13
Import Rename-Pairs
Import rename pairs to be used for renaming (renaming from a text file).
Clear Imported-Pairs
If you have imported rename pairs then this option will wipe out the list of pairs from memory.
Normally the list would only be removed by loading a different list or by exiting the application.
Debug New Name
If you have a one (and only one) file or folder selected in the right-hand pane then this menu item becomes
available. What this will do is display a simple dialog box which shows how the file's "new name" has been
derived. This can help when you are using lots of the controls and boxes, and you aren't getting the end
result that you are expecting.
Reset All Renaming Criteria (Ctrl+T)
This allows you to quickly reset all the renaming-criteria which are currently selected. Handy if you want to
start from scratch. (This won't reset your file-selection and new-location items, groups 12 and 13).
Reset All Criteria to Last Saved (Ctrl+E)
Reverts all renaming criteria to the last saved status.
Rename (Ctrl+R)
Actually perform the rename. This is an alternative to pressing the RENAME button on the screen.
Undo Rename (Ctrl+Z)
If you have just performed a rename activity, and then said "oops..." then this is the option you need. This
function will try to "undo" your last rename activity (including any timestamp and attribute changes you
made). The files are processed in reverse order, so even if you renamed folders, and files within the folders,
the full operation should be reversed successfully.
Create Undo Batch File (Ctrl+B)
Similar to Undo Rename above, this will allow you to create a DOS batch file which can be run from the
command line, and which will reverse out your last renaming operation.
14
15
16
With this option selected, any "extensions" within folder names will be ignored - this is because extensions
have no real meaning, unlike filename extensions which identify the file type. So for example, if you have a
folder called "Holidays.2004" and you choose to remove the last 2 characters, the resulting folder name will
be "Holidays.20" or "Holida.2004", depending upon the status of this option.
Log Activity (Ctrl+L)
Use this option to record a log of all your renaming activity (including undo requests). The log file will be
created in the same folder as the Bulk Rename Utility executable file, and will have the same name as the EXE
but with a .log suffix. Please note that only renaming activity is logged, not changes to attributes or
timestamps.
Show Warning Message Before Renaming
This allows you to control whether or not you are warned prior to renaming files.
Show Confirmation Message After Renaming
This allows you to control whether or not a confirmation message is shown after renaming is complete.
Special Menu
Change File Attributes
Open the Change File Attributes settings.
Change File Timestamps
Open the Change File Timestamps settings.
Change Character Translations
Open the Character Translations settings.
Change Javascript Renaming
Open the Javascript Renaming settings.
Javascript Libraries ...
Include sugar.js : make the library sugar.js available to Bulk Rename Utility Javascript code.
Include date.js : make the library date.js available to Bulk Rename Utility Javascript code.
17
18
Context Menu
If you right- click an item in the right-hand window (e.g. a file or a folder) you will be presented with a
Context menu (or "Shell" menu). You will see the standard Windows context menu (with options to Edit,
Delete, Copy etc.), with four additional menu options in a new "Clipboard Copy" menu.
The "Clipboard Copy" menu items allow you to copy various pieces of information, such as the file name or
folder path, to the Windows clipboard.
Note:
1.If you perform an operation on a file/folder using the Shell menu which changes the name of that file, or
deletes the file, then this is not automatically reflected in Bulk Rename Utility. This avoids unnecessary
rebuilding of the file listing.
2.If you are using the "sub-folders" option, and you select multiple files which span two or more folders, then
the right-click context menu might give unpredictable results.
19
20
Using Favourites
A Favourite is a collection of configuration values which can be used to provide quick access to commonlyused criteria. For example, if you frequently want to rename a bunch of pictures in one folder, and you
frequently want to rename a bunch of sound files in another folder, then you could create two Favourites
called Pictures and Sound Files. Each Favourite holds with it the selection criteria, rename criteria, and current
folder.
When you launch the application for the first time you will not have any Favourites defined, but you can
create favourites in the same was as you would create text files or pictures. Store them anywhere on your
hard drive and use them as you wish.
Each individual Favourites file contains all the criteria you used to rename files. So for example, you could
create a Favourite for renaming your pictures; a Favourite for stripping dodgy characters out of filenames etc.
You can then recall these Favourites whenever you need them.
To use favourites, just use the Open and Sav e/Sav e As menu options in the same way as you would do in
Word or Excel and other programs. When you choose to save a favourite, all the settings currently in place
will be saved into that favourite. You can then recall these quickly, either from the Open command or by
double-clicking a Favourite file in Windows Explorer. Favourites files have the file extension .bru.
If you have loaded a Favourite and made changes to it, but wish to revert back to the original version, then
choose Revert all criteria to last saved in the Actions menu.
21
Picture Viewer
Bulk Rename Utility allows you to display a preview window, which will show the picture for the currently
selected file. Only certain file-types are supported, these being jpeg (JPG), bitmap (BMP) WIndows Metafiles
(WMF) and Compuserve Graphical Interchange Format (GIF).
In addition, you can only display the picture for a single file; if you select multiple files then no preview will be
displayed.
22
23
24
Additional Features
25
Additional Features
Custom Date Formats
You can append a variety of dates to the file names, either at the beginning or the end. For example, you
could prefix the file names with their Modified date, or you could suffix them with the Creation Date. See section
'Auto Date (8)'.
A new feature, introduced in version 2, is the ability to add date and time information in a very flexible
manner, using standard formatting codes. The full list of codes is defined below. So for example, if you
wanted to suffix the file name with the day name and the month you could enter a custom code of "%a%M".
The full list of codes is:
Code
Meaning
%a
%A
%b
%B
%d
%H
%I
%j
%m
%M
Minute (00-59)
%p
AM/PM Indicator
%S
Seconds (00-59)
%U
Week number of year (00-53), with Sunday as the first day of the week.
%w
%W
Week number of year (00-53), with Monday as the first day of the week.
%y
%Y
%z
%%
Percentage sign
You can enter other text in the file name, and the symbols above will be substituted with the values. So, you
could enter a custom value of "Created on %a, %d %B, %Y" to get "Created on Tuesday, 25th March, 2004"
26
Recursive Scans
It is possible to perform a recursive scan and rename from the current folder. This allows you to rename
folders and files contained within any subdirectories from the current folder. Subdirectories of subdirectories
are also scanned, right down to the lowest level. To do this, enable the Subfolders option of Selection (12).
This option needs to be treated with great care - if you scan a high-level folder such as C:\ or C:\Program
Files then the program could have tens of thousands of files to scan. Whilst the system should cope with in
excess of 250,000 files, it will take a long time for the file list to be displayed.
As such, it is recommended that you only use the Subfolders Option of Selection (12) only if you really need it.
Please note that, if you rename a folder whilst using the recursive option, after the rename is complete the
file list will be refreshed automatically. This is to prevent problems whereby the file-list becomes out of
synchronization with the files on your hard drive. If you don't rename a folder (just files), or if you rename
anything whilst not using the recursive option, then no refresh is necessary.
Additional Features
27
28
Regular Expressions
Bulk Rename Utility supports powerful Regular Expression processing. This allows you to enter a flexible
Match expression, and a flexible Replacement expression, and the program will generate the appropriate
name using these expressions. For example, you can use match and replace strings to swap two words in a
filename, or remove numbers, or apply fixed formatting.
A full description of Regular Expressions is beyond the scope of this help file, but a wide range of resources is
available on the internet. However, the syntax supported by Bulk Rename Utility is the same as that offered
by PERL 5. The precise implementation is via the PCRE Library, and full notes on the Perl Regular Expression
syntax can be found here.
We also have a section on our forum dedicated to Renaming Files using Regular Expressions.
A quick summary of the syntax is:
Character
Usage
x|y
(pattern)
Matches pattern
{number}
{number,}
{num1, num2}
[abc]
[^abc]
[a-e]
[^K-Q]
\b
\B
\f
\n
\r
\s
\S
\t
\d
Replacements are usually performed on the basis of "components, and these are defined using \ notation, e.
Additional Features
29
EXAMPLE:
Assume you have a file called Program Files , and you wish to swap the names around (e.g. Files Program). A
Regular Expression which performs this task is :
^([A-Z][a-z]*) ([A-Z][a-z]*)
Let us break this down into components:
^ This means start at the beginning of the string
([A-Z][a-z]*) This is a single "group", which we will use later. What this says is that we want any capital
letter, followed by any number of lower-case letters. The single capital letter is denoted by the [A-Z], i.e.
allow a letter in the range A to Z. The lower-case letters are denoted by [a-z] in the same way, followed by
an asterisk. This means we can allow any number of letters.
We then allow a single space. If I had wanted multiple spaces I would probably have typed "space asterisk",
or possible ( *) to group.
We then have exactly the same again, i.e. we are denoting two words.
Notice we had two sets of brackets. Everything within each set of brackets is treated as a "grouping", and we
refer to these groupings as \1, \2, \3 etc.
So, lets say we wanted to swap around the two words in the filename. We would put:
^([A-Z][a-z]*) ([A-Z][a-z]*)
For the match string, and
\2 \1
As the replacement string. Of course, we're free to manipulate the replacements string as we like. For
example, it would be quite valid to have:
The \2 which are used to run the \1
For the replacement string. This would result in:
The Files which are used to run the Program.
The above example is very precise. If we wanted to swap the first two words of a name, but keep the
30
Additional Features
31
32
Additional Features
33
Character Translations
Character Translations allows you to enter a specific character or sequence of characters, and have that
translated into a different character or sequence of characters. So for example, you could specify that you
always want a $ sign to be converted into the word DOLLAR.
There are three ways to enter the replacement data:
1.As a character, e.g. A
2.As a hex value, e.g. 0F
3.As a decimal value, e.g. 065
Separate the FROM and the TO conversions with an equals sign (=). If you wish to actually convert an equals
sign to/from something else then you can specify the hex or decimal value for the equals sign in your rules.
Bulk Rename Utility identifies the type of value entered by its length. So if your value is one character long
then it's a direct character; two characters long and its a hex value; three characters long and its a decimal
value.
In the following examples, every example is converting a capital "A" to a capital "B"
A=B (direct expression of the characters to convert)
41=42 (two character long, therefore hex values)
065=066 (three characters long, therefore decimal values)
A=066 (using a mixture of the above)
41=066 (using a mixture of the above)
If you wish to to convert several characters then you can separate the values by commas. So the following
example will convert ABC to DEF:
41,066,C=D,E,070
If you wish to actually convert a comma sign to/from something else then you can specify the hex or decimal
value for the comma sign in your rules.
Learn more on our website : Character Translations HowTo
34
JavaScript Renaming
Javascript renaming gives you total flexibility and full control of your file renaming needs by using Javascript
code.
Bulk Rename Utility uses the V8 Javascript, Google's high performance Javascript engine also used in Google
Chrome. V8 implements ECMAScript as specified in ECMA-262, 5th edition.
All standard Javascript syntax and functions are supported. Additional javascript libraries can be included, see
below.
Javascript code is processed as the last step after all other renaming options have been applied. The
javascript code is applied to each object as the last step, before it is renamed.
A commercial license for Bulk Rename Utility is required to use Javascript Renaming.
Here is an example of a Javascript script which changes a file name in Bulk Rename Utility. The script is applied
to each selected file. This scripts adds a counter, padded with up to 5 zeros, after each file name:
Explanation:
- The function padLeft is defined.
- newName represents the new name of the file.
- name represents the current name of the file.
- counter is a counter that starts from 1 and it's incremented for each file.
More examples can be found on our website: Javascript Renaming Examples
Constant / Variable
Type
Explanation
name
Constant This constant contains the name of the object (i.e. file or folder name)
being processed, after all Bulk Rename Utility renaming options 1 to 13
and all specials have been applied. If the Bulk Rename Utility renaming
options 1 to 13 and specials did not modify the name, then name will be
the same as origName (see below).
Additional Features
35
Constant / Variable
Type
Explanation
newName
Variable
origName
Constant
ext
Constant
newExt
Variable
origExt
Constant
location
Constant
newLocation
Variable
subDir
Constant
counter
Constant
This variable contains the new name to be applied to the object. Modify
this variable to modify the object name. If you do not modify the
variable newName, then the javascript code has no effect on the name
of an object.
This constant contains the original name of the object before all Bulk
Rename Utility renaming options 1 to 13 and all specials.
This constant contains the extension of the object (i.e. file or folder
name) being processed, after all Bulk Rename Utility renaming options 1
to 13 and all specials have been applied. If the Bulk Rename Utility
renaming options 1 to 13 and specials did not modify the extension,
then ext will be the same as origExt (see below).
This variable contains the new extension to be applied to the object.
Modify this variable to modify the object extension. If you do not modify
the variable newExt, then the javascript code has no effect on the
extension of an object.
This constant contains the original extension of the object before all
Bulk Rename Utility renaming options 1 to 13 and all specials.
This constant contains the location of the object as specified in Location
(13)
This variable contains a modified location (13) for the object. If you do
not modify the variable newLocation, then the javascript code has no
effect on the location (13) of an object.
This constant contains the object sub directory (it matches the subdir
column in the file list). It is only applicable if subfolders have been
included in Selection (12).
A counter that is incremented during the renaming operation, starting
from 1. To retrieve the Bulk Rename Utility 'auto number' as used in
section Numbering (10), use the object function below.
Function
Explanation
object("value")
Details / Examples
36
Function
Explanation
Details / Examples
object being processed. (Javascript Date)
exif("value")
alert("text")
regEx("text",
"match",
"replace")
setEnv
("varname",
"value")
getEnv
("varname")
include
("filename")
require
("filename")
Additional Features
37
38
name.endsWith(/[q-z]/)
name.startsWith(/[a-d]/, null, false)
Y
Y
N
N
ext.isBlank()
object('modified').getTime() == exif('%d').
getTime()
Y
N
N
N
object('modified').getTime() != exif('%d').
getTime() && exif('%d').getTime() != 0
object('size') == 0
N
Y
N
N
object('modified').weeksAgo() < 4
object('modified').isBetween('yesterday',
'tomorrow');
object('modified').isBetween('the beginning of
last month', 'today');
Additional Features
note below.
Include all non-empty objects. This
examples shows that multiple statements
separated by ';' can be included in the
condition.
Includes myfile.js which defines myFunction
then include object if myFunction is true.
-------------------------------------------------------------(*) sugar.js support can be activated in Bulk Rename Utility, menu 'Special' -> 'Javascript Libraries'. See sugar.js
(**) date.js support can be activated in Bulk Rename Utility, menu 'Special' -> 'Javascript Libraries'. See date.js
39
40
Support
If you have any comments or suggestions, please get in touch. The latest version of the application can
always be downloaded from the website.
Remember, the easiest way to find your way around the application is to experiment. You won't do any harm
unless you hit the Rename button, so you can play around with as many settings as you like!
The application's homepage is at www.bulkrenameutility.co.uk
Contact information is at www.bulkrenameutility.co.uk/Contact.php
41
42
tested with non-critical data before relying on it. The user must assume
the entire risk of using Bulk Rename Utility.
* Copyright and Trademark Rights *
The Software is owned by TGRMN Software. This Agreement does not
grant you any intellectual property rights in the Software. TGRMN Software
owns Copyright and all Intellectual Property Rights to the Software and to
any copies made of the Software.
* Restrictions *
You agree not to modify, adapt, translate, reverse engineer, decompile,
disassemble or otherwise attempt to discover the source code of the
Software. You may not use, copy, modify or transfer copies of the
Software except as provided in this licence. You may not decompile,
disassemble, or create derivative works based upon the Software. You
may not modify, adapt, translate, or create derivative works based upon
the written documentation. You may not sub-license, rent, lease, sell or
assign the Software to others. All explicitly non-granted rights are
reserved.
This license is provided personally to you and for that reason it does not
allow you to make any duplicate (copy) to be sold, borrowed, assigned,
leased or transferred in any manner whatsoever to another person. Any
transfer executed in violation of this provision shall be deemed invalid and
constitute a reason for termination of your license validity.
* Governing Law *
This Agreement shall be governed by, construed and enforced in
accordance with the internal substantive laws (and not the laws of choice
of laws) of South Australia, Australia, without giving effect to the conflict of
laws provisions. Sole venue shall be in the applicable state and federal
courts of South Australia.
43
44
45
46
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the University of Cambridge nor the names of any
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Index
Created Date
32
Ctrl+O
20
Ctrl+S
20
Ctrl+Z 12
Custom Date Formats
Index
-AAccessed Date
32
Actions
12
Add (7)
3
Agreement
41
Always On Top
14
Append Folder Name (9)
Archive
31
Attributes
31
Auto Date (8)
3
-D-
date.js
17
Deselect
12
Drag
23
Dragging files form folders
Drop
23
23
-EEdit
18
End
41
Explorer
22, 23
Extension (11)
3
-BBasics
2
Beginning
2
BMP
21
Bulk Rename From Here
Buy
43
25
-F22
-CCase (4)
3
Change Character Translations
17
Change File Attributes
3, 17
Change File Timestamps
3, 17
Change Javascript Renaming
17
Character
33
Character Translations
3
Click
18
Clipboard
18
Colours
14
Commercial
43
Condition
38
Context
18, 22
Copy
18
Copyrights
44
F2
24
F8
12
Favourites
20
File
27
File (2)
3
Filter
38
Filters (12)
3
Filters group (group 12)
Forum
40
From
27
-GGetting Started
GIF
21
-HHelp
40
31
47
48
Hidden
-P-
15
15
-J-
Pairs
12
Picture
21
Pipe
27
Presets
20
Prevent Duplicates
Problem
40
-QQuick Rename
JavaScript
34, 38
Javascript Libraries
17
Javascript Renaming
3
JPEG
21
JPG
21
Jump
12
-MModified Date
Move/Copy (6)
My Computer
24
-R-
15
32
3
23
Random
12
Read Only
31
Recursive
26
Refresh
12
RegEx (1)
3
Registry
19
Regular Expressions
28
Remove (5)
3
Rename
27
Rename in Reverse Order (Advanced Option)
renaming
34
Renaming Files and Folders
10
Renaming From a Text File
3
Repl. (3)
3
Retain Autonumber
15
Right
18
15
-SSave
19
Scan
26
Select
12
Selection
38
Settings
19
Shell
18
Show Confirmation Message After Renaming
15
Index
Show Warning Message Before Renaming
Sorting > Group Affected Files
14
Sorting > Logical Sorting
14
Sorting > Sort Files and Folders Together
Special
3
Subfolders
26
sugar.js
17
Support
40
System
31
-TText
27
Timestamps
Translations
32
33
-UUndo
12
User
41
Using Favourites
20
-VViewer
21
-WWebsite
40
WMF
21
-ZZoom
12
15
14
49