Re: Best way to auto rename files
Re: Best way to auto rename files
- Subject: Re: Best way to auto rename files
- From: Michael Sullivan <email@hidden>
- Date: Tue, 18 Feb 2003 11:47:38 -0800
I have a folder with files that I need to give a new name; or more
accurately; I need to expend the file names with the same number; i.e.
file "Jones" will be renamed "567 Jones" and file "Smith" into "567
Smith"
IMHO, the _best_ way to do it is with a shell script:
folder="folder-path"
prefix="567"
cd $folder || { echo "Cannot cd to $folder" ; exit 1; }
for i in *
do
echo mv "$i" "$prefix $i"
done
I left that last echo there so you can see what it would do. Take
it out and it works. Of course if your renaming is part of a bigger
Applescript problem this this won't be of much use.
--
Michael Sullivan email@hidden
Aelix, Inc. (818)678-1033
9255 Corbin Ave. (818)678-4726 (fax)
Northridge, CA 91324-2401 www.aelix.com
_______________________________
Scanned and protected by Inflex
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.