Re: The Save command will replace, without asking
Re: The Save command will replace, without asking
- Subject: Re: The Save command will replace, without asking
- From: Michelle Steiner <email@hidden>
- Date: Fri, 7 Oct 2005 10:26:02 -0700
On Oct 7, 2005, at 10:06 AM, Robert Poland wrote:
After much searching I found this. "The Save command will replace,
without asking, an existing file with the same name as the
specified file (if one exists)."
Where did you find it? Does it apply to all applications, or just
the one you're scripting?
Is that the bottom line or is there a way to not overwrite existing
files?
I would prefer maybe adding an incrementing number to the name then
saving.
Have the script check for an existing file of the same name. If one
exists, save under a different name.
on validatefilename(myfilename, targetfolder)
tell application "Finder"
if myfilename is in name of files of targetfolder then
--code to change name goes here
my validatefilename(myfilename, targetfolder)
end if
end tell
return myfilename
end validatefilename
-- code to save file goes here
--
"My country, right or wrong: if right, to be kept right; and if
wrong, to be set right."
Senator Carl Schurz of Missouri, 1899
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden