![]() ![]() I usually don’t pack several folders into one archive.Īs you might have noticed, I added a dialog to the end of workflow, showing the result of packing. ![]() And also there is no need to provide the full path to folder that needs to be archived as we are already inside that directory.Ĭurrently this service works only with a single folder, because in was easier that way and also because I only need that functionality for a single folder. Of course, you can specify the full path where to create archive, but then inside the archive you will get the full hierarchy of folders. Otherwise it will try to create archive somewhere in the system path and will fail with an access error. That way zip utility will “ know” the path where to operate. zip -r9 folderToArchive.zip folderToArchive -x "*.DS_Store"įirst half (the part before ) of the command is an environment (working directory) setting - we go the target directory and then we go one level up (. After all substitutes it looks like this:Ĭd /path/to/the/folderToArchive/. I want to give you some explanation about cmd. zip file created in the same folder as your selected files. Set logScript to load script "/path/to/your/scripts/write2log.scpt" set fnameScript to load script "/path/to/your/scripts/getFname.scpt" #write2log("/path/to/your/logs/some.log", input) of logScript if (count of input) is not 1 then # it was easier to implement it with just one folder display dialog "You can archive only one folder." with icon stop with title "Error" buttons default button "OK" end if end runįunction getFolderName(filePath) is available from this script. In the example below, this option is shown as Compress with BetterZip.
0 Comments
Leave a Reply. |