Bulk file renames in Windows Explorer

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Working in Windows Explorer today, I noticed something that I found pretty useful. At first I wasn’t sure if it was a new feature in Windows 7 (I’ve since tested and found XP will do something similar, so I guess Vista will too) but I was bulk renaming files and found that Explorer would allow me to rename several files to the same filename root, but suffixed with an identifier to ensure that each file name was unique.

For example, imagine you work for an organisation that produces a lot of customer design documents but which is really keen on re-use. Some customisation is inevitable but you might start out with a template document, or you might work from a documentation set produced for a similar customer environment.

In this example, I have three documents in my set:

Customer X – Infrastructure Design (AD)
Customer X – Infrastructure Design (Exchange)
Customer X – Infrastructure Design (SharePoint)

If I copy and paste these, I now have 6 documents:

Customer X – Infrastructure Design (AD) – Copy
Customer X – Infrastructure Design (AD)
Customer X – Infrastructure Design (Exchange) – Copy
Customer X – Infrastructure Design (Exchange)
Customer X – Infrastructure Design (SharePoint) – Copy
Customer X – Infrastructure Design (SharePoint)

Keeping the copies highlighted, if I right click and select Rename, I can rename them all to a common root of Customer Y - Infrastructure Design. The resulting directory structure is:

Customer X – Infrastructure Design (AD)
Customer X – Infrastructure Design (Exchange)
Customer X – Infrastructure Design (SharePoint)
Customer Y – Infrastructure Design (3)
Customer Y – Infrastructure Design (2)
Customer Y – Infrastructure Design

At this point, it’s now very simple (faster than renaming each file individually and typing the whole filename would have been) to amend the end of each filename to get what I really wanted:

Customer X – Infrastructure Design (AD)
Customer X – Infrastructure Design (Exchange)
Customer X – Infrastructure Design (SharePoint)
Customer Y – Infrastructure Design (AD)
Customer Y – Infrastructure Design (Exchange)
Customer Y – Infrastructure Design (SharePoint)

Some people may be unimpressed. Others may say “script it”. And more people might say use the document templating features in Microsoft Office! Whatever your view, for me, this was a real timesaver.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.