Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rate Thread Display Modes
Old 11-06-2012, 11:31 AM   #1
creativetags
Registered User
 
Join Date: Nov 2012
Posts: 1
Exclude .DS_Store from Archive Utility compression

Is there a way to change the default behaviour of the built in archive utility so when I select a folder in the Finder and right-click -> Compress "folder" it excludes .DS_Store in the resulting zip archive?

I'm using OS 10.8.2 if that makes a difference.
creativetags is offline   Reply With Quote
Old 11-07-2012, 12:43 AM   #2
mclbruce
Hall of Famer
 
Join Date: Mar 2002
Posts: 3,870
Not that I know of. There are applescripts that invoke the zip command with options that will surpress that. That could be saved as an app or put in the services menu.
mclbruce is offline   Reply With Quote
Old 11-07-2012, 11:41 AM   #3
NovaScotian
Hall of Famer
 
Join Date: Oct 2002
Location: Halifax, Canada
Posts: 4,946
In an AppleScript you delete a hidden file by calling it an "item", not a file.
__________________
17" MBP, OS X 10.8.3; 27" iMac, OS X 10.8.3
NovaScotian is offline   Reply With Quote
Old 11-07-2012, 11:51 AM   #4
trevor
Moderator
 
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,551
creativetags, is using the command-line version of zip (instead of an application that runs in the GUI) an option for you?

Trevor
trevor is offline   Reply With Quote
Old 11-07-2012, 03:45 PM   #5
mclbruce
Hall of Famer
 
Join Date: Mar 2002
Posts: 3,870
Quote:
Originally Posted by NovaScotian
In an AppleScript you delete a hidden file by calling it an "item", not a file.

In the applescript app I have, the zip command does the excluding or deleting.
Code:
do shell script ¬
	("cd " & itemPath & "; zip -r " & zipFile & " . -x '*.DS_Store'")
mclbruce is offline   Reply With Quote
Old 11-08-2012, 12:13 PM   #6
riker29
Prospect
 
Join Date: Oct 2004
Posts: 8
It would be great to get a full copy of an AppleScript that does this, and also know how to get it in the Services menu.

There is a small App that does create archives in this manner called "CleanArchiver". You can just drag and drop a file or folder onto it and get that kind of archive we are talking about. But it would be easier if this functionality could somehow be added to the Services menu or incorporated into an AppleScript.
riker29 is offline   Reply With Quote
Reply

Tags
archive utility, os x, zip

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 05:00 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.