Re: DropStuff workaround (was Re: OS X and RegEx Commands)
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: Sat, 27 Dec 2003 08:36:08 +1100
On 26/12/2003, at 10:46 PM, Walter Ian Kaye wrote:
>
I just got an idea. I could autocreate a temporary folder for the
>
archive to go, and then rename the archive, move it out of the folder,
>
and autodelete the folder. Stupid workaround for a stupid program, but
>
should be enough to make things appear smart to the user.
I got a script working which did a basic form of this. I found the page
http://www.macosxhints.com/article.php?story=20030512084055685 very
helpful with the unix part of making the disk images. I copied an item
to a disk image in the temporary items folder and then gzipped it to a
backup disk.
I think it is slower than StuffIt Deluxe but it is a free alternative.
Below is a guide for how the script works. It still needs tidying up -
such as getting the correct size of the backup items and checking that
the .dmg file does not already exist in the temporary items folder and
deleting it at the completion of the script.
set backupPath to POSIX path of file fileToBackup
set dmgPath to POSIX path of (path to temporary items) & "Backup.dmg"
tell application "Finder"
set BUDiskPath to POSIX path of backupDisk
end tell
do shell script "hdiutil create -size 200m -fs HFS+ -volname
BackupFolder " & quoted form of dmgPath
do shell script "ditto -rsrcFork " & quoted form of backupPath & "
/Volumes/BackupFolder"
do shell script "hdiutil unmount /Volumes/Backup"
do shell script "gzip -c " & quoted form of dmgPath & " > " & quoted
form of BUDiskPath & "Backup.tgz"
John
_______________________________________________
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.