Ken wrote:
> 
> I need some help renaming a bunch of files, about 350 in fact.  They all
> begin with vacation*.jpg
> 
> example:
> 
> vacation01.jpg
> vacation02.jpg
> vacation03.jpg
> 
> I want to rename just the vacation part to toronto**.jpg.  toronto01.jpg,
> toronto02.jpg etc...
> 
> What would I type to accomplishing this?  Typing 'mv vacation01.jpg >
> toronto01.jpg' for each file isn't fun either.  My only other alternative
> is using a windows renaming program to rename them and upload them again.
> It's on my remote server and I'd just like to rename them on the server so
> I don't have to re-upload them.

I'm not sure if a utility exists but it's pretty simple enough to write a small
bash or perl script to do it. I highly recommend reading up on shell (eg. bash -
the default shell in Mandrake) scripting. It'll save you untold riches worth of
time and grief. ;-)

Especially if you do this sort of thing a lot.

Hint: Always, always, always! Have a scratch directory to do your testing - esp.
when you have valuable/irreplacable data that could get hosed by a still-buggy
script.


-- 
--------------------------------------
Kuraiken - Apprentice Codecaster
--------------------------------------

Reply via email to