Re: Finder replacing ask
Re: Finder replacing ask
- Subject: Re: Finder replacing ask
- From: "Stockly, Ed" <email@hidden>
- Date: Thu, 03 Apr 2008 17:24:21 -0700
- Thread-topic: Finder replacing ask
Title: Re: Finder replacing ask
>>John>>How do I get the Finder to ask if you want to write over the file?
This is how I would do it:
------
tell application "Finder"
try
move thisFile to thatFolder
on error errMsg number errNum
if errNum = -15267 then
display dialog errMsg & return & return & "Overwrite or skip?" buttons { "Skip", "Overwrite"} default button 2
set userChoice to the button returned of the result
if userChoice is "Overwrite" then
move thisFile to thatFolder with replacing
end if
end if
end try
end tell
--------
HTH,
ES
_______________________________________________
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