{"id":769,"date":"2012-02-08T00:02:53","date_gmt":"2012-02-07T23:02:53","guid":{"rendered":"http:\/\/www.nimbling.com\/blog\/?p=769"},"modified":"2012-02-11T14:32:06","modified_gmt":"2012-02-11T13:32:06","slug":"applescript-to-clean-zip-files-of-ds_store-and-__macosx-cruft","status":"publish","type":"post","link":"https:\/\/nimbling.com\/blog\/2012\/02\/applescript-to-clean-zip-files-of-ds_store-and-__macosx-cruft\/","title":{"rendered":"Applescript, Service and Hazel rule to clean ZIP files of .DS_Store and __MACOSX cruft."},"content":{"rendered":"<p>It performs the following commands on the selected zip:<br \/>\nzip -d Zipfile.zip \\*.DS_Store<br \/>\nzip -d Zipfile.zip \\*__MACOSX*<\/p>\n<p>Which is just a long way of saying it deletes those files from any zip you feed it. Makes you popular with the Windows half of your network ;)<\/p>\n<p>I included a service (Automator) that lets you run these commands on arbitrary files. I suggest feeding it a zip &#8211; and not an application bundle :)<br \/>\n<a href=\"https:\/\/nimbling.com\/blog\/2012\/02\/applescript-to-clean-zip-files-of-ds_store-and-__macosx-cruft\/screen-shot-2012-02-09-at-00-11-16\/\" rel=\"attachment wp-att-793\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/nimbling.com\/blog\/wp-content\/uploads\/Screen-Shot-2012-02-09-at-00.11.16.png\" alt=\"\" title=\"Screen Shot 2012-02-09 at 00.11.16\" width=\"614\" height=\"575\" class=\"aligncenter size-full wp-image-793\" srcset=\"https:\/\/nimbling.com\/blog\/wp-content\/uploads\/Screen-Shot-2012-02-09-at-00.11.16.png 614w, https:\/\/nimbling.com\/blog\/wp-content\/uploads\/Screen-Shot-2012-02-09-at-00.11.16-150x140.png 150w, https:\/\/nimbling.com\/blog\/wp-content\/uploads\/Screen-Shot-2012-02-09-at-00.11.16-300x280.png 300w, https:\/\/nimbling.com\/blog\/wp-content\/uploads\/Screen-Shot-2012-02-09-at-00.11.16-320x300.png 320w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/a><\/p>\n<p>I also included a <a href=\"http:\/\/www.noodlesoft.com\/hazel.php\">hazel<\/a> rule that applies this action to any zip on your desktop :)<\/p>\n<p><a href=\"https:\/\/nimbling.com\/blog\/2012\/02\/applescript-to-clean-zip-files-of-ds_store-and-__macosx-cruft\/screen-shot-2012-02-08-at-23-47-23\/\" rel=\"attachment wp-att-775\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/nimbling.com\/blog\/wp-content\/uploads\/Screen-Shot-2012-02-08-at-23.47.23.png\" alt=\"\" title=\"Screen Shot 2012-02-08 at 23.47.23\" width=\"782\" height=\"641\" class=\"aligncenter size-full wp-image-775\" srcset=\"https:\/\/nimbling.com\/blog\/wp-content\/uploads\/Screen-Shot-2012-02-08-at-23.47.23.png 782w, https:\/\/nimbling.com\/blog\/wp-content\/uploads\/Screen-Shot-2012-02-08-at-23.47.23-150x122.png 150w, https:\/\/nimbling.com\/blog\/wp-content\/uploads\/Screen-Shot-2012-02-08-at-23.47.23-300x245.png 300w, https:\/\/nimbling.com\/blog\/wp-content\/uploads\/Screen-Shot-2012-02-08-at-23.47.23-365x300.png 365w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><\/a><\/p>\n<p>To use <a href=\"http:\/\/www.nimbling.com\/Downloads\/Clean%20Zip.zip\">this<\/a> script with <a href=\"http:\/\/www.alfredapp.com\/\">Alfred<\/a>, you&#8217;ll need to get the <a href=\"http:\/\/www.alfredapp.com\/powerpack\">powerpack<\/a> too.<\/p>\n<p><strong>Grab the scripts <a href=\"http:\/\/www.nimbling.com\/Downloads\/Clean%20Zip.zip\">here<\/a>!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It performs the following commands on the selected zip: zip -d Zipfile.zip \\*.DS_Store zip -d Zipfile.zip \\*__MACOSX* Which is just a long way of saying it deletes those files from any zip you feed it. Makes you popular with the &hellip; <a href=\"https:\/\/nimbling.com\/blog\/2012\/02\/applescript-to-clean-zip-files-of-ds_store-and-__macosx-cruft\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[120,122,121],"class_list":["post-769","post","type-post","status-publish","format-standard","hentry","category-ui-customization","tag-applescript","tag-hazel","tag-service"],"_links":{"self":[{"href":"https:\/\/nimbling.com\/blog\/wp-json\/wp\/v2\/posts\/769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nimbling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nimbling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nimbling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nimbling.com\/blog\/wp-json\/wp\/v2\/comments?post=769"}],"version-history":[{"count":33,"href":"https:\/\/nimbling.com\/blog\/wp-json\/wp\/v2\/posts\/769\/revisions"}],"predecessor-version":[{"id":821,"href":"https:\/\/nimbling.com\/blog\/wp-json\/wp\/v2\/posts\/769\/revisions\/821"}],"wp:attachment":[{"href":"https:\/\/nimbling.com\/blog\/wp-json\/wp\/v2\/media?parent=769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nimbling.com\/blog\/wp-json\/wp\/v2\/categories?post=769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nimbling.com\/blog\/wp-json\/wp\/v2\/tags?post=769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}