Re: Simple request
Re: Simple request
- Subject: Re: Simple request
- From: julifos <email@hidden>
- Date: Sat, 08 Mar 2003 09:17:44 +0100
>
What is the simplest way to copy files from a directory
>
where they exist to a directory where they may or may
>
not exist? Not a move, a copy. In Unix one would type:
>
>
cp $srcDir/* $dstDir
>
>
The Finder dictionary doesn't seem to have a copy
>
operation. It has a duplicate operation, but I'm having
>
a little trouble getting that to work ("Finder error, could
>
not complete the operation" -- not sure why, yet)
>
>
I keep thinking that there has to be an easy way to do
>
this common operation, but I can't seem to find it.
You already typed the best way (also "ditto", to preserve fork).
Duplicate command works ok, but there are still some inconsistences in the
Finder, and not all works as expected.
Anyway, this should do the job:
######################
set x to alias "path:to:original:file"
set y to alias "path:to:destination:folder:"
tell app "Finder" to duplicate x to y with replacing
######################
JJ
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.