• 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: DropStuff workaround (was Re: OS X and RegEx Commands)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DropStuff workaround (was Re: OS X and RegEx Commands)


  • Subject: Re: DropStuff workaround (was Re: OS X and RegEx Commands)
  • From: Graff <email@hidden>
  • Date: Sat, 27 Dec 2003 21:56:01 -0500

In the case of doing multiple items I would say the best option would be to create a temporary folder, copy the items into the folder, and then create a disk image from that temporary folder. You could also try making a folder of hard links (do "man ln" in the terminal) and using that folder as your source, but then everything has to be on the same volume.

The last option is to create an image, mount it, copy stuff to it and then unmount it:
----------
do shell script "hdiutil create -size 10m -volname " & theVolName & " -fs HFS+ -attach " & theDMGFile
-- copy stuff into the volume named in the variable theVolName
do shell script "hdiutil unmount /Volumes/ " & theVolName
----------

The only trouble with this approach is that you need to set a size for the filesystem ahead of time. Generally you can find this out by adding up the sizes of the files and adding on another 1% for overhead. To be safe I'd add another 100k on top of that.

- Ken

On Dec 27, 2003, at 6:29 PM, John Cochrane wrote:


On 28/12/2003, at 7:42 AM, Graff wrote:

Couldn't you just use the -srcfolder option?

Fantastic. Thanks Ken, your script runs like a treat and thanks for tidying up my syntax as well. I feel like I am just dipping my toe in a sea of Unix and did not really understand how the -src option worked.
I wanted to use it to compress a combination of files and folders from different locations into one .dmg file.
I could get the POSIX paths of the items into a list but what is the best way to use hdiutil to process them.
Is there a way to script folders to be copied to the disk image and not just their contents?
The need for administrator privileges is a nuisance but I can live with it.
_______________________________________________
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.

  • Follow-Ups:
    • Re: DropStuff workaround (was Re: OS X and RegEx Commands)
      • From: John Cochrane <email@hidden>
References: 
 >Re: DropStuff workaround (was Re: OS X and RegEx Commands) (From: John Cochrane <email@hidden>)

  • Prev by Date: XCode PlugIn (Using AppleScript)
  • Next by Date: Re: File name manipulation
  • Previous by thread: Re: DropStuff workaround (was Re: OS X and RegEx Commands)
  • Next by thread: Re: DropStuff workaround (was Re: OS X and RegEx Commands)
  • Index(es):
    • Date
    • Thread