• 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: Renaming multiple files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Renaming multiple files


  • Subject: Re: Renaming multiple files
  • From: Chris Page <email@hidden>
  • Date: Thu, 04 Dec 2008 06:10:36 -0800

On Dec 4, 2008, at 02:40 AM, Miguel Moya wrote:

-Count the number of files of folder "A".
-Starts a repeat command using the number of files.
-Takes the first file of this folder, rename it always with the same name (always 1.xls) and move it to folder "B" overwriting the previous file.
-Go to the next file.

tell application "Finder" to get files of folder "Input Files" of desktop returning folderItems

set i to 1
repeat with f in folderItems
tell application "Finder" to move f to folder "Output Files" of desktop
set the name of the result to (i as text) & ".xls"
set i to i + 1
end repeat

-- 
Chris Page - AppleScripter

 The other, other AppleScript Chris



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Renaming multiple files
      • From: "Mark J. Reed" <email@hidden>
    • Re: Renaming multiple files
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Renaming multiple files (From: Miguel Moya <email@hidden>)

  • Prev by Date: Applescript that compares two directories.
  • Next by Date: Finder folder names
  • Previous by thread: Re: Renaming multiple files
  • Next by thread: Re: Renaming multiple files
  • Index(es):
    • Date
    • Thread