Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!uwm.edu!uwvax!titanic.cs.wisc.edu!tonyrich From: tonyrich@titanic.cs.wisc.edu (Anthony Rich) Newsgroups: comp.sys.mac.misc Subject: Bulk UnBinHex/UnStuff script for Stuffit Deluxe Message-ID: <1991Feb27.042456.946@spool.cs.wisc.edu> Date: 27 Feb 91 04:24:56 GMT Sender: news@spool.cs.wisc.edu (The News) Organization: U of Wisconsin CS Dept Lines: 60 Originator: tonyrich@titanic.cs.wisc.edu Here's a simple Stuffit Deluxe script to automatically unBinHex and unStuff all the .hqx files in a certain folder. The script assumes all the files are in a top-level folder named "Downloads" on your Mac, and you DO have to combine multi-part .hqx files some other way BEFORE you run this script. All lines starting with "--" are comments and can be left in the script as-is if desired. To install it, just put the script anywhere on your hard disk (or whatever you use for a startup disk), launch Stuffit Deluxe, then pull down the "Script" menu and select "Add Script to Menu...". Navigate to wherever you put the script, select it, and click ADD. Now you can run the script by selecting its name from the Script menu. You can edit the script with any text editor (even after it's installed), but if you do, always save it as a plain TEXT file (not as a Word 4.0 document, for example). Enjoy! -- Tony Rich (tonyrich@cs.wisc.edu) Here's the script: ------------------------------------------------------------------------ -- Stuffit Deluxe script to UnBinHex and UnStuff all .hqx files that -- are in a top-level folder named "Downloads" on the startup disk. -- -- NOTE: Combine any multi-part .hqx files in the Downloads folder -- BEFORE running this script. Otherwise the script will try to -- unBinHex the parts separately; it will report a CRC error when -- it tries to unBinHex the first incomplete part and then fail. ------------------------------------------------------------------------ -- Put Stuffit progress messages into the file "Stuffit Deluxe Msgs". -- This step isn't essential, but the messages can be informative if -- something goes wrong while the script is executing. Write Status To "{Startup}Downloads:Stuffit Deluxe Msgs" -- Set the destination for UnBinHexed files to be the Downloads folder. Destination "{Startup}Downloads:" -- Decode all .hqx files in the "Downloads" folder and leave them there. -- The Decode BinHex command doesn't have a "delete" option, so the .hqx -- files will still be there when this script is finished. Some files -- may not be .sit files after UnBinHexing, but that's okay. Decode BinHex "{Startup}Downloads:*.hqx" -- Now QuickUnStuff all the resulting files that end in ".sit", deleting -- the .sit files as they are processed. QuickUnStuff is used instead -- of plain UnStuff so that each set of unstuffed files is placed in its -- own folder. QuickUnStuff "{Startup}Downloads:*.sit" delete -- Quit Stuffit Deluxe. Quit ---------------------------- End of Script -----------------------------