Rename Files Dialog

The Rename Files dialog is available from the Commands menu in the main window. This dialog renames files on your hard disk using the FAR file list in the main window. Many files can be renamed very quickly so make sure you initially check the preview checkbox (checked by default).

This command does not alter folder names, just filenames. It works on files in the FAR file list (main window). If the Preview checkbox is checked you will see a preview before each change. The name %name%.%ext% represents the current filename.

Tips and Tricks:

Example: Files "fred01.png", "fred02.png", "fred03.png" renamed to %name%%inc%.%ext%. With Inc Start=3 Width=2. The result will be be "fred03.png", "fred04.png", "fred05.png". But note that the first rename will fail because "fred03.png" already exists. If you do foresee these situations then best to rename to a unique file name first, then later you can change the file name back. Here's an example:

Example: "fred01.png", "fred02.png", "fred03.png" --> xyz_%name%%inc%.%ext% ->  "xyz_fred03.png", "xyz_fred04.png", "xyz_fred05.png" will work perfectly as xyz_ make the file names unique. You can then perform another rename --> %name%.%ext% with a replacement of "xyz_" to "". This will result in "fred03.png", "fred04.png", "fred05.png" as you originally wanted.

Controls
Rename to %name% and %ext% are replaced by the current file Name and Ext as each file in the FAR file list is examined.
  • Example 1: Change all file extensions to ".XML" enter %name%.XML
  • Example 2: Prefix all files with "BMC_" enter BMC_%name%.%ext%
  • Example 3: Add incrementing number, enter BMC_%name%%inc%.%ext%
Replace all spaces with underscores
  • Example 1: A filename "Fred Mercury 1.htm" would be renamed to "Fred_Mercury_1.htm".

Note: Using spaces in a filename is not good practice for Web and Help files.

Make lowercase When checked all characters in the filename are forced to lowercase.
Find & Replace Text Allows you to perform find and replace on the filename. The Find text is not case sensitive.
  • Example 1: Find "_BEL" replace with "" will change file name "File_Bel_tools.htm" to "File_tools.htm".

Note that you can also use a single * wildchar in the Find text. This allows you to find text from start to end text. EG. "BC*F" would match "bcdef" part of "abcdefg.htm".

  • Example 2: Find "_*_" replace with "-act-" will change file name "File_Bel_tools.htm" to "File-act-tools.htm".

A trailing * would remove the end of the string after and including the match (see example 3). A leading * would remove the start of the string up to and including the match (example 4).

  • Example 3: Find "_*" replace with "-act.htm" will change file name "File_Bel_tools.htm" to "File-act.htm".
  • Example 4: Find "*_Bel" replace with "Act-Bel" will change file name "File_BEL_tools.htm" to "Act-Bel_tools.htm".
Increment %inc% Start / Width %inc% can also be inserted into "Rename to" file name mask to add an incrementing number. You can specify the start number (numbers always increment by one) and the field width of the number (numbers are always padded with zeros to the left). Note that any existing numbers found appended to a filename will be removed if %inc% is used.

Example 1. A files "fred1.png", "fred2.png", "fred3.png" are renamed to %name%%inc%.%ext%. With inc Start=3 Width=2. The result will be be "fred03.png", "fred04.png", "fred05.png".

Preview each change When checked you will be prompted before each change is made. You should always start with this option checked (the default) so you can preview the first few changes. Then when satisfied with the changes click the All button on the prompt dialog to continue on without prompts. Or click Cancel on the prompt dialog to abort the rest of the renaming.
Range Default is to rename all items in the FAR file list. If one or more item are selected in the FAR file list you can select "Selected Files" to only rename the selected files.
OK, Cancel, Help Click OK to start renaming files; Cancel to close the dialog; Help to show this help.

The FAR file list columns "Replacements" and "Matches" are set to show you what files have been altered. Match = 1 and Replace = 0 indicates you were prompted to change the file however answered No.


http://www.HelpwareGroup.com/