• 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: Copying folder structures
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copying folder structures


  • Subject: Re: Copying folder structures
  • From: "Mark J. Reed" <email@hidden>
  • Date: Sat, 22 Dec 2007 17:39:09 -0500

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)"



--
Mark J. Reed <email@hidden>
 _______________________________________________
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

  • Follow-Ups:
    • Re: Copying folder structures
      • From: Skeeve <email@hidden>
    • Re: Copying folder structures
      • From: Kurt Klamp <email@hidden>
References: 
 >Copying folder structures (From: Kurt Klamp <email@hidden>)
 >Re: Copying folder structures (From: "Mark J. Reed" <email@hidden>)
 >Re: Copying folder structures (From: Skeeve <email@hidden>)

  • Prev by Date: Re: Copying folder structures
  • Next by Date: Re: Copying folder structures
  • Previous by thread: Re: Copying folder structures
  • Next by thread: Re: Copying folder structures
  • Index(es):
    • Date
    • Thread