• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best way to auto rename files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Best way to auto rename files SORRY ! (From: Christian Vinaa <email@hidden>)

  • Prev by Date: Best way to auto rename files SORRY !
  • Next by Date: How to tell frontmost app from Script Menu?
  • Previous by thread: Best way to auto rename files SORRY !
  • Next by thread: Re: Best way to auto rename files SORRY !
  • Index(es):
    • Date
    • Thread