#468822 - 10/19/0608:44 PMRe: auto-mount network drives and back up
So the auto-mount is fairly easy. I'll let you figure that one out, it will be worth your time to figure it out and learn a little bit about applescript. Here's a proof of concept script to show you that you can compress a folder to a zip file... you could expand this to do a tar or some other form of compression, or do multiple folders to the same zip....
put this in script editor or copy the unix command to the terminal to test for yourself. good luck, let me know if you need any help.
-- pick a file to zip (in your case you could just set POSIXFolder to "~/" if the user you want to backup is logged in or "/Users/" if you want to get them all. But beware, some apps store some big files in the user library folders! set FinderFolder to choose folder
-- this step is to make the finder file you just selected into a POSIX (unix) path. set POSIXFolder to (POSIX path of FinderFolder)
-- here's the chicken and stuffing of the script. First move to the directory to create the zip file in, then do a ditto to crate the file. I named it Test.zip, but you could name it whatever you want (a different name for each script, or append this script to make that a variable of your choosing set ArchiveScript to ("cd ~/ ; ditto -c -k -X --rsrc " & POSIXFolder & " Test.zip ")
-- And do the script. This is just how I like to write scripts. Define the script, then a separate command to run it. I don't know how much more memory or time I am wasting doing it this way, but it makes it alot easier if you are going to be test multiple script values. At least I think so. do shell script ArchiveScript
Xplain's use of MacNews, AppleCentral and AppleExpo are not affiliated with Apple, Inc. MacTech is a registered trademark of Xplain Corporation. AppleCentral, MacNews, Xplain, "The journal of Apple technology", Apple Expo, Explain It, MacDev, MacDev-1, THINK Reference, NetProfessional, MacTech Central, MacTech Domains, MacForge, and the MacTutorMan are trademarks or service marks of Xplain Corp. Sprocket is a registered trademark of eSprocket Corp. Other trademarks and copyrights appearing in this printing or software remain the property of their respective holders.
All contents are Copyright 1984-2010 by Xplain Corporation. All rights reserved. Theme designed by Icreon.