Re: Copying folder structures
Re: Copying folder structures
- Subject: Re: Copying folder structures
- From: Kurt Klamp <email@hidden>
- Date: Sun, 23 Dec 2007 00:28:15 +0100
Hi all,
thanks for the input.
I didn't tried the 'shell script' solution so far, but it seems a
very short one.
Originally i was looking for a plain AS solution because i'm not
familiar with the shell script thingies at all.
And i want to do some additional stuff when cloning the folder
structure.
So there seem to be 2 solutions
a- do it with AS and do the additional stuff on the fly
or
b- do it with the shell script and do the additional stuff afterwards.
I still would prefer the AS solution.
Kurt
Am 22.12.2007 um 23:39 schrieb Mark J. Reed:
On Dec 22, 2007 4:57 PM, Skeeve <email@hidden> wrote:
That does NOT copy.
1. No Ownership
2. No Permissions
Well, maybe "copy" implies preservation of those things to you, but
it doesn't to me. A copy of a file that is owned by someone else
with different permissions is still a copy.
cd sourcedir ; ( find . -type d -print0 | xargs -0 tar cBpf - ) | ( cd
targetdir ; tar xBpf - )
Uhm, not OMM. That will still get everything, not just the
directories; maybe the dmg is all you had in the source tree? You
don't want -B, which is something about block sizes. You want --no-
recursion, and you only need it on the creation side.
do shell script "(cd " & quoted form of POSIX path of sourceFolder &
"&& find . -type d print0 | xargs -0 tar --no-recursion -cpf -) |
(cd " & quoted form of POSIX path of destFolder & "&& xargs -0
mkdir -p)"
_______________________________________________
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