• 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: Duplicate with replacing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Duplicate with replacing


  • Subject: Re: Duplicate with replacing
  • From: Christian Vinaa <email@hidden>
  • Date: Thu, 10 Feb 2005 10:49:24 +0100

Basic newbie question.

I want to duplicate a folder "A" to a folder "B" with replacing.

If the folder "B" already contains a folder named "A" (to be replaced), no problem. The script works fine.

If not (no folder "B" to be replaced), the script stops without duplicating.

Amazing, no ?
What would be the "smart" way to manage it ?
Thanks in advance.

BA


i just get a lot of tries to see what works and what does not work with some basic stuff
(in fact I really miss some very basic scripts doing very basic stuff)



this works, but only once - the second time the script errors with a mesage stating that there already IS a folder A in folder B
**
tell application "Finder"
set myA to folder "A" of folder "Desktop" of folder "myUser" of folder "Users" of startup disk
set myB to folder "B" of folder "Desktop" of folder "myUser" of folder "Users" of startup disk
duplicate myA to myB
end tell
**



so if I put in

--duplicate myA to myB with replacing

it works ok also the second and third time around



--
Christian Vinaa

email@hidden

...... Meanwhile, aunt Martha, having taken a tramp in the woods,
is lying in a ditch at the edge of town .........................
_______________________________________________
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: 
 >Duplicate with replacing (From: Bernard Azancot <email@hidden>)

  • Prev by Date: Re: The future for AppleScript [was Re: where are the shell scripts ?]
  • Next by Date: Re: QUOTED posix to HFS path
  • Previous by thread: Re: Duplicate with replacing
  • Next by thread: QUOTED posix to HFS path
  • Index(es):
    • Date
    • Thread