• 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
renaming files with applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

renaming files with applescript


  • Subject: renaming files with applescript
  • From: email@hidden
  • Date: Wed, 22 Oct 2008 17:41:47 -0500 (CDT)
  • Importance: Normal

Hi I am trying to rename some files with applescript

I have two variables, oldName and newName

this is part of a bigger script, but have simplified it down to just what
is not working... the variables are normally created by the script, I have
substituted the info directly here to make it more clear...

this does not work:
set oldName to "Users:richsimpson:Desktop:apc.jpg"
set newName to "Users:richsimpson:Desktop:test.jpg"
tell application "Finder"
    activate
    set name of file oldName to newName
end tell

this does not work either:
tell application "Finder"
    activate
    set name of file "Users:richsimpson:Desktop:apc.jpg" to
"Users:richsimpson:Desktop:test.jpg"
end tell

any ideas as to what I am doing wrong?
thanks,
-Rich

 _______________________________________________
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 files with applescript
      • From: Stan Cleveland <email@hidden>
    • Re: renaming files with applescript
      • From: Brian Christmas <email@hidden>
    • Re: renaming files with applescript
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Path to syntax question
  • Next by Date: Re: renaming files with applescript
  • Previous by thread: Re: Path to syntax question
  • Next by thread: Re: renaming files with applescript
  • Index(es):
    • Date
    • Thread