renaming files with applescript
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