Re: Finder acting up
Re: Finder acting up
- Subject: Re: Finder acting up
- From: Michelle Steiner <email@hidden>
- Date: Tue, 21 Dec 2004 23:34:11 -0700
On Dec 21, 2004, at 1:36 PM, Autocat wrote:
I'm having a bunch of problem scripting the Finder (this is under
10.3.6 & 10.3.7)
duplicate theFile to theDestinationFolder with replacing
Just doesn't duplicate if there's already a file with the same name in
the destination folder. Same problem is I use move instead of
duplicate (the destination folder is on a local hard disk)
Did you use "with replacing"?
set the_file to (path to documents folder as text) & "test file"
tell application "Finder"
move file the_file to the startup disk with replacing
end tell
Also, I spent a great deal of time trying to determine if a folder
exists, and create one if it doesn't. I tried the various "folder
exists" syntaxes to no avail.
This works for me:
tell application "Finder"
if not (exists folder "test folder" of startup disk) then
make new folder at startup disk with properties {name:"test folder"}
else
display dialog "That folder already exists."
end if
end tell
-- Michelle
--
Peter pull at St. Taffy's tonight! (Or is it the other way around?)
_______________________________________________
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