How can I automatically remove characters from 200 filenames?
January 23, 2005 7:13 PM
Subscribe
Six characters, in search of a way to replace them
I have a series of files whose names I'd like to edit by taking out part of the name and replacing it but the part I'd like to remove from each file name is different. [more]
I have more than 200 files whose names look like this:
filename.garbage.000
filename.garbage.001
filename.garbage.002
etc.
In each file, the garbage I'd like to remove is six characters between the two dots, and there seems to be some kind of sequence to them (#3E3A0, #3E3A1, #3E3A2, etc.) but they all need to go. I guess one of the dots needs to go, too. Since the garbage in each file is different, that screws up the ordering of the part numbers at the end of the filenames and we can't have that.
I'm using OS X and I've tried the various filename-editing Applescripts I have, but those haven't done what I wanted them to. (Unless I was doing it wrong.) Any Applescript or Terminal gods out there?
posted by emelenjr to computers & internet (16 comments total)
posted by emelenjr at 7:15 PM on January 23, 2005