Re: Rename File Script newbie question
Re: Rename File Script newbie question
- Subject: Re: Rename File Script newbie question
- From: Phil Holden <email@hidden>
- Date: Fri, 7 Mar 2003 11:10:56 +0000
Hi,
Thanks to those of you who have helped me with this and particularly
Emmanuel who sent me down a very productive path.
This is the script that I have ended with.
tell application "Finder"
activate
if item "myfile.html" of folder "myfolder" exists then
set name of item "myfile.html" of folder "myfolder"
to "myfile.bac"
move item "myfile.bac" of folder "myfolder" to folder
"myfolder:backup" with replacing
end if
set name of item "export.tmp" of folder "myfolder" to "myfile.html"
end tell
This script is created in a calculation field within Filemaker which
inserts the filename "myfile" and the folder path "myfolder".
This results in the previous export being saved as a backup. This
backup is then overwritten on the next export.
I've put in the step renaming the backup files with the suffix .bac
simply to visually differentiate these files from my current files. I
probably don't need this as they are of course in a separate folder
named backup.
Thanks again to those who helped.
best wishes
Phil
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Philip Holden Tel: 01765650079 Fax: 01765 650081
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
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.