• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: The Save command will replace, without asking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >The Save command will replace, without asking (From: Robert Poland <email@hidden>)

  • Prev by Date: The Save command will replace, without asking
  • Next by Date: Re: long shot..
  • Previous by thread: The Save command will replace, without asking
  • Next by thread: Re: The Save command will replace, without asking
  • Index(es):
    • Date
    • Thread