How can you improve your sound effect’s impact?
Not every sound effect has a perfect name. And, in the case of legacy DVD or CD libraries, they may have barely any name at all.
It’s easy to correct a single name, or even a dozen. What happens whey you find yourself working with a collection of thousands of unnamed files? No one has time to fix a horde of mysterious files one at a time.
So, today I’ll finish off the second “Metadata Month” by showing how you can do this more quickly using batch renaming.
Many metadata apps can rename sound libraries. However, the apps can be expensive. Batch renaming does this simply, free of charge or inexpensively, often using just the apps included with your OS.
It’s not hard. You don’t need to be a power user. However, it is a bit more involved, and does require concentration. Set aside some time, grab yourself a coffee, and settle in. I’ll guide you through the process.
Please note: I am very detailed. This post should take about 12 minutes to read. Click the button below to email the article to yourself to read later.
Why Batch Rename Sound Clips?
Organizing a sound library isn’t easy. One common problem is bland file names. Often DVD libraries are digitized with generic names (audio01.wav). This is common with legacy libraries from Sound Ideas and The Hollywood Edge. These libraries are ripped from audio CDs. This means they lack metadata that more recent libraries enjoy. They’re commonly dumped into folders with names applied with a mere CD catalog number. And while ripping audio from CDs isn’t common any longer, it is common to stumble across libraries ripped this way from years past.
At other times your sound file names are understandably rushed in an effort to put them to work quickly. Their names may be simply incorrect. They may be littered with spelling errors. They may be short, or incomplete. You may wish to tack more information onto your existing names.
Whichever the case, unfinished names are common. Composing good names takes time. It’s hard to take the time to assign each sound clip an intriguing and helpful name.
Before long you have thousands of clips with lifeless descriptions. An unorganized library becomes a a mess of similarly-named files. It’s hard to find what you need in these libraries. It diminishes your productivity. Work stalls. Properly-named files speed up fx searches.
What’s the next step? Renaming each separately takes ages. The solution is batch renaming.
What Is Batch Renaming?
Batch renaming uses special apps to rename vast swaths of files instantly. It uses text file instructions to tell an app or OS the new name to apply to each original file.
In the case of CD libraries, batch renaming instantly assigns rich information from the Sound Ideas or The Hollywood Edge databases to those generic audio01.wav files.
Overview of Batch Renaming
How can you do this? Batch renaming is broken down into these distinct steps:
- Create a text file list of the old, incorrect file names. This is known as the source list.
- Create a text file list of the new, good file names. This is known as the destination list.
- Combine the old and new file names in a single, joined text file list. This new file is called an association file.
- Check the data and export.
- Create a backup.
- Rename the files.
How It’s Done
It all seems simple in concept. The core of the process comes down to something I call the association file. This is a set of instructions which tells an app how to rename files. It pairs the old file name with the new one. They’re listed beside each other in two columns in a text file, like this:
Old name01.wav New name01.wav
Old name02.wav New name02.wav
Old name99.wav New name99.wav
The association file is a text file. It may be in comma-separated (CSV), or tab-separated (TAB) format. Here’s an example association file in an Google Docs spreadsheet:
So, this file tells an app to find the old name (Old name01.wav), and to rename it with the name paired beside it (New name01.wav). There may be hundreds or thousands of names, depending on how many you’d like to change.
What’s the tricky part? Well, associating the names properly is a delicate process. A single, improperly-named entry, or a skipped line row in any column can ripple down the list and give a file its brother’s name, instead of its own.
I’ve renamed and ingested hundreds of thousands of sound files for Web shops. I’ll show you the how to do this without risk.
What You Need
To get started batch renaming you need:
- A file name extractor. This is an app that fetches the filenames from within a folder, or group of folders, and saves them into a text file. A paid PC option is Print Directory. Both Mac OS X and Windows can do this from within the OS, which I’ll explain in a moment.
- A text editor. This will allow you to make basic edits to your source and destination file list, including finding and replacing text. Mac OS X offers the free TextEdit app. Windows provides Notepad and Wordpad. Microsoft’s Word is a heavier option, as is the free OpenOffice equivalent. TextWrangler is another excellent free option for Mac.
- A spreadsheet app. You’ll use this app to create the association file. Spreadsheet apps arrange the old and new names in tidy columns. Microsoft Excel, Apple’s Numbers, FileMaker, or the free Google Docs all do the job.
- A batch renaming app. This is an app that will apply the association list to the sound files. It uses the text file you’ve created to change the old name to the new one. A Mac option is A Better Finder Rename. Windows fans can use Bulk Rename Utility. Want to do this for free? I’ll share how to rename in Windows using a BAT file in a moment.
- A good chunk of uninterrupted time. Batch renaming is a delicate process. You don’t want to be disturbed and lose track at a critical moment. Set aside an hour to prepare.
How to Batch Rename Sound Clips
- Create a source file list. To start, you’ll need to create a list of all the old, incorrect files. You need a list with one file name per line or row. Typing each file name by hand for thousands of files isn’t practical. So, instead, we’ll use software to create these lists for us. Options:
- Software: Print Directory (Windows) and A Better Finder Rename (Mac) allow you to drag-and-drop folders of files onto an app window, then export a text list of those files.
- Mac OS X’s TextEdit:
- Open a new document.
- Set it to plain text by choosing the Format/Make Plain Text menu item.
- Drag and drop audio files onto the text window. This will create a text list of all file names dropped on the window.
- Save the file.
- Click the Start menu item.
- Select Run.
- Type cmd. This will present a DOS window.
- Navigate to the folder of files that you want to save as a text file (e.g., c:\folder).
- Type DIR > filelist.txt. This will save a text file with the name you specify (filelist.txt) into the same folder as the files. (Note: DIR / w > filelist.txt will include directories with the file names, and DIR / w/ a-d > filelist.txt will include just the file names.)
It’s important to note that most software needs just the file name in the source file list text file. Some of these options also include the path name, or other junk text, too:
Hard drive name/Folder 1/Folder 2/sound file name.wav
It must look just like this:
sound file name.wav
Use a text editor “find and replace” function to find the path name (Hard drive name/Folder 1/Folder 2/) and replace it with nothing.
Other apps do indeed need the path prefixed to the sound file name in both the source and destination lists. Check the specifications of the software you’ve chosen. Use “find and replace” to prefix the path to the file names if you need to.
Save this file, and call it Source list.txt.
Create a destination file list. The next step is to create a list of the proper, destination file names. They must be listed in order, with one name per line or row.
Want to rename old Sound Ideas and The Hollywood Edge CDs? Download their databases from their website, find the library you want to rename, and export the list as a text file.
Your new, correct, destination names may be in a PDF or Word file. Export this information as as a plain text file (File/Save As…, and choose .txt). You may need to touch up these files. They may contain junk text. It’s important to include just the new sound file name, and one name on each line.
If you don’t have an existing list of destination names, you’ll need to make create one yourself. List your new names in a text file. Each name must have its own line. Ideally these names must be in the same order as the source file list, but this can also be touched up in step 3.
In some cases your destination names will be drawn from the old ones. This is common when you need to merely touch up spelling, category names, and so on. In this situation, simply copy the list of names from step 1 and edit your changes with a text editor: spelling, expanding abbreviations, and so on.
Save this file as Destination list.txt.
Associate the lists. This step creates a spreadsheet database with two columns. The first column lists the source names. The second column lists the new, destination names. They will be paired beside each other, horizontally.
- Open a new Excel, Numbers, or Google Docs spreadsheet document.
- Select everything in your source list, copy it (File/Copy menu item), and paste it (File/Paste menu item) into the first column. This will fill each vertical cell of the spreadsheet with the old names in a list from top to bottom, with one name per row. Remove any empty rows.
- Select everything in your destination list, copy it, and paste it into the second column. This will list the new names beside the old ones in a similar way: top to bottom, with one file name per row.
When you’re done, your list will look like this:
Check the data and export. It’s vital that the association file is perfect. If any of your source names are incorrect, they will not be renamed. If the destination names are not paired with the proper, matching source sound file, you’ll be giving the old sound file the wrong name.So, it’s important to review this file carefully. Review the destination column to fix spelling and review illegal OS characters (e.g., & $ ^ % # /). Ensure that both of the columns have an equal number of items. Review the list carefully to ensure the tracks match perfectly, side by side.
Not matching up properly? Touch up the source or destination lists, then return to step 3. This can be a finicky process. Take your time. It’s important that the association list is perfect.
When you’re finished, export this list as a tab-separated text file. Save it as Association list.txt.
Create a backup of the source files. Duplicate the folder of your old, incorrect source sound files. Yes, the entire folder. It takes extra space, but this is only temporary. Why do this?
Well, any error in your association file may permanently rename thousands of files incorrectly. If this does happen, delete those files and revert to your backup.
Batch rename. The final step is performing the rename. It’s comparatively easy. In most cases an app performs the renaming automatically. It simply looks at the association file, and follows the instructions to apply the new sound file name from column 2 to the old name in column 1, one at a time, for each row in your association file list.
I use A Better Finder Rename’s Advanced & Special/Rename From File List to do this. Simply drag and drop the source files onto its window, and select a text file listing the new names (only) in order.
Another handy (and free) option is to use a Windows BAT file. A BAT file is a simple text file than can perform a variety of disk functions. It requires just a slight modification to our association file exported in step 4:
- Open the tab-separated association list text file in a text editor.
- Insert “REN ” in front of each name. This is an instruction to call the DOS rename function for each file.
- Remove the tab character between the old and new file names. The result will look like this:
REN Old name01.wav New name01.wav
- Save the text file.
- Change the extension of the file to “.BAT” from “.TXT”
- Move the file into the same folder of the files.
- Double-click the file. It will rename all the files.
Are your files spread across many folders? You can insert the path into each line, like this:
REN C:\soundlibraryA Old name01.wav New name01.wav
REN C:\soundlibraryB Old name02.wav New name02.wav
And that is it. If you have followed the steps above carefully your folder of raw, unnamed files will be renamed in seconds.
Remember to take your time. Make backups, and save your work as you go. Errors can ruin the entire job, leaving you with a jumble of mismatched files.
You may wish to break up large batches into smaller, manageable chunks. Unsure if you’re on the right track? Start with renaming ten files instead of ten thousand. Group your batches in thousands of files, or perhaps divided alphabetically by destination file name.
The result? An improved sound library with strong names that ensures you find the best sounds swiftly and accurately.