• 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: Finder acting up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Finder acting up
      • From: Autocat <email@hidden>
    • Re: Finder acting up
      • From: Emmanuel <email@hidden>
References: 
 >Finder acting up (From: Autocat <email@hidden>)

  • Prev by Date: Re: iTunes Help
  • Next by Date: Re: Xmas Etiquette
  • Previous by thread: Finder acting up
  • Next by thread: Re: Finder acting up
  • Index(es):
    • Date
    • Thread