Re: renaming files with applescript
Re: renaming files with applescript
- Subject: Re: renaming files with applescript
- From: Brian Christmas <email@hidden>
- Date: Thu, 23 Oct 2008 11:04:36 +1100
On 23/10/2008, at 9:41 AM, email@hidden wrote:
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
G'day Rich
try
set oldName to "Users:richsimpson:Desktop:apc.jpg"
set newName to "test.jpg"
tell application "Finder"
activate
set name of file oldName to newName
end tell
Regards
Santa
_______________________________________________
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