Show/Hide Toolbars

WordSmith Tools Manual

Navigation: Utility Programs > File Utilities

Rename multiple files

Scroll Prev Top Next More

The point of it

 

To rename a lot of files at once, in one or more folders. You may have files with excessively long names which do not suit certain applications. Or it is a pain to rename a lot of files one by one.

 

Template procedure:

Here you want to rename your texts so as to fit them to a template based in part on the existing file-names.

Your text files just need a date parsing and maybe some unwanted characters could be cleared too.

 

Mask procedure:

Here the idea is to rename a set of files with a standard name plus a number. For example suppose you have downloaded a lot of text files containing emails from the Enron scandal, you could rename them

 

Enron001.txt

Enron002.txt

etc.

 

How to do it

Choose the folder which your texts are in and decide whether you want to rename one in any sub-folders. Choose the types of file such as .TXT, .XML etc.

 

renamer_settings

Now decide whether you want a mask procedure or a template procedure. If it's a mask and you want them all called Enron plus a number, just put Enron#### where the number of # symbols shows a minimum number decimal digits in the resulting file-names. Choose a number to start the counter off with.

 

If it's a template, use these symbols

 ?        retains the existing character

 ~        cuts this character in the original file-name

 ^        these are digits which have a meaning for the date

In the example above, I wanted to keep the first character, remove the next 7, treat the following 6 as a date, and keep the next 6.

The dates in the originals were ordered ddmmyy (day, month, year, e.g. 310512 as 31st Oct 2012) but I wanted them re-ordered with a four-digit year (yyyy) then an underscore, then the month and day. I also wanted the texts files to be automatically dated so that their file-dates matched their publication dates.  

 

See also : compare two files, file chunker, find duplicates