• 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: John Cochrane <email@hidden>
  • Date: Sun, 28 Dec 2003 11:16:58 +1100

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.

John

The script would then be:
-------------
set myRecord to (display dialog "Enter a name for your archive : " default answer "")
set archiveName to text returned of myRecord
set button to button returned of myRecord
set selectedFile to choose file
tell application "Finder"
update selectedFile
end tell

if archiveName is not "" and button is not false then
try
set filePath to quoted form of (POSIX path of selectedFile)
set dmgPath to quoted form of ((POSIX path of (path to desktop folder)) & archiveName)
set archiveName to quoted form of archiveName
set theCommand to "hdiutil create -srcfolder " & filePath & " -fs HFS+ -volname " & archiveName & " " & dmgPath
do shell script theCommand with administrator privileges
on error errmsg
display dialog errmsg
end try
end if
-------------
_______________________________________________
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: Graff <email@hidden>
  • Prev by Date: Re: New AppleScript book- why a dog
  • Next by Date: File name manipulation
  • Previous by thread: Re: New AppleScript book- why a dog
  • Next by thread: Re: DropStuff workaround (was Re: OS X and RegEx Commands)
  • Index(es):
    • Date
    • Thread