wqprebel.blogg.se

Create zip file mac
Create zip file mac





create zip file mac

ZipIt from (choose file with multiple selections allowed) without erase and keepParent given destinationFolder:path to desktop If erase then do shell script "rm -r " & quoted form of source Set destination to text 1 thru ((offset of Nm in source) - 1) of source & Nm & “.zip”ĭo shell script “/usr/bin/ditto -c -k -rsrc” & k & quoted form of source & space & quoted form of destination Set destination to POSIX path of (dFolder as alias) & Nm & “.zip” If Ex is not “” then set Nm to text 1 thru ((count Nm) - (count Ex) - 1) of Nm Set destination to text 1 thru -2 of source & “.zip” Set destination to text 1 thru -2 of (POSIX path of (dFolder as alias)) & “.zip” Set source to POSIX path of (someSource as alias) If s ends with “/” then set s to text 1 thru -2 of sĭo shell script "cp -pr " & quoted form of s & space & tempFolder Set tempFolder to quoted form of (POSIX path of (path to temporary items) & “zip_temp_folder”)ĭo shell script "rm -r " & tempFolder & "/" On ZipIt from someSource given erase:erase, keepParent:keepParent, destinationFolder:dFolder Result: the alias of the created archive or boolean false, if an error occured KeepParent if true, keep original name of parent folder while creating an archive of a folder Leaving it empty ("" or missing value) saves the archive in the directory of the sourceĮrase if true, erase files/folders after creating the archive Must be an alias, file, or HFS path or a list of these classesĭestinationFolder destination folder. SomeSource file or folder, list of files or folders.







Create zip file mac