[xplorer˛] — Mass rename tricks
home » blog » 5 April 2009
play flash demo

"A statistician drowned in a pond that was only 1-inch deep—on average"

I take a lot of stick for the substandard mass renaming capabilities in xplorer˛. Where's the regexp support for complex rename scenarios, sub-string replace and so on that other file managers offer? OK, xplorer˛ isn't very good at removing parts of existing filenames, but it excels in adding to the base name. How many file managers do you know that can rename adding ID3 tags?

IMHO there are so many ways you can modify a filename that there is no possibility of a clean intuitive GUI. That's why File > Mass rename menu command is rather poor. The most common use is to compose a filename adding to $B (basename) token, either a fixed string, an automatically incremented counter ($1) or even a column from detailed view — using ${column_name} token. Here are some examples for 3 name templates and 3 files:
$B_old.$E $01 $N ${size}.$E
source.cpp   source_old.cpp   01 source.cpp   1245.cpp
other.cpp other_old.cpp 02 other.cpp 3343.cpp
header.h header_old.h 03 header.h 145.h

Observe the font color to associate the $-tokens in each rename template with the part of the filename. ${size} is the file size column which is different for each file. It's questionable what's the purpose of adding the file size in the filename, but I am just hilighting the possibilities. If you are not very confident with the $-tokens use the preview button to see how the first few selected filenames will look like once you hit the rename button.

If you need more advanced filename manipulation, you can use a dedicated mass renaming program, like those mentioned in chapter 8 of the full PDF manual (Help > Contents menu). For even more flexibility you can use a text editor to rename files just like as if you were editing a document! Here's how:

  1. Select the files you want to rename free-form
  2. Use Tools > Command script menu to create the basic text file containing the filenames
  3. Use this template ren "$F" "$N" and click Edit button
  4. Edit the script for the desired filenames, save it and double-click on it to rename!

UPDATE: For a better mass renaming experience, which includes automatic search and replace parts of filenames, and automatic insertion of all file metadata and attributes as rename rules, try the latest xplorer˛ version 3.0.

The trick is using the DOS ren command to rename files. When the batch file is first created it does nothing since it uses the same filename as source ($F=fullpath) and target ($N=name) arguments to ren. Then you alter the target filename to whatever suits your needs and mass rename you go. If you still can't get your head around it, have a look at today's demo video

Post a comment on this topic



What would you like to do next?

Reclaim control of your files!
  • browse
  • preview
  • manage
  • locate
  • organize
Download xplorer2 free trial
"This powerhouse file manager beats the pants off Microsoft's built-in utility..."

© 2002—2009 Nikos Bozinis, all rights reserved