Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dukebound85

macrumors Core
Original poster
Jul 17, 2005
19,118
4,096
5045 feet above sea level
How would one go about changing

v_2011-07-21.grib 2

to

v_2011-07-21.grib


I have thousands of files this way and hard time manipulating them in NCL as *.grib will not process the files with the 2

Thanks for any help!
 

chown33

Moderator
Staff member
Aug 9, 2009
10,706
8,346
A sea of green
I don't know what NCL is.


This shell pattern:
Code:
*.grib*
will match filenames with or without a trailing " 2".

It will also match other filenames, such as:
Code:
Dale.gribble.txt


To change a bunch of filenames, you should first identify what a safe new filename is. Is simply stripping the " 2" safe?

Automator.app has a number of file-renaming capabilities. Start there.

Then you might look into two utilities: A Better Finder Rename, and NameChanger. There are others, google search terms: mac os x batch file rename
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.