Rename File Script newbie question
Rename File Script newbie question
- Subject: Rename File Script newbie question
- From: Phil Holden <email@hidden>
- Date: Thu, 6 Mar 2003 17:20:06 +0000
Hi,
I wonder if someone here could help me with a little problem.
I'm using the following script as a script step in a FMPro export
script in order to rename html files using calculated filenames.
tell application "Finder"
activate
move item"myfile" of folder "myfolder" to trash
set name of item "exportfilename" of folder "myfolder" to "newfilename"
end tell
This works OK but as I am testing my application the trash gets more
and more full. I know that I could empty the trash from my script but
I prefer not to do this.
Is there some way for me to rename a file to another name and if this
name already exists for this file to be overwritten. I have read
about using replacing boolean but can't seem to get this to work in
this script. I think that I need guidance on the exact syntax for use
of replacing.
I'm working in OS 10.2.4 but would like the script to work in OS9 and previous.
Any help would be very much appreciated.
Best wishes
Phil Holden
_______________________________________________
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.