fMRI scans produce an awful lot of data.  Depending on whether you’re getting you scanner to output 3D or 4D data, you can end up with one file per measurement, or file per scan.  If you’re dealing with 3D data (the one files per measurement option), you’re in for a long night if you decide that you don’t like the existing file-naming convention, and want to replace it with something a little simpler e.g. if you want to remove unique identifiers to allow for batch processing .  For example, the experiment I’m testing right now collects 292 measurements in each of its five functional scans, that’s 1460 files in total.  If it only takes me a three seconds to rename a file manually, then it’ll still take me over an hour to finish, and that’s just for one participant.

Of course, you could script something to do this pretty quickly, there’s an even easier way: Ant Renamer.

With a few clicks, you can select all the files within a folder (and its subfolders) and carry out a pretty versatile range of file renaming tasks in seconds – it takes about 5 seconds to rename 1460 files once I tell Ant Renamer what to do.  I use it to remove unique identifiers from fMRI data filenames, but the options are there to delete the first x characters from a file, change the extension, add incremental numbers to filenames, even use MP3 metadata to rename MP3s.

Ant Renamer is well worth investigating if you ever find yourself daunted by the prospect of file renaming in bulk – I’ve found it so useful that I keep a portable copy (no install required) on my dropbox so that I can access it on the move.

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>