MACSCRPT Archives

March 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Nobumi Iyanaga <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 20 Mar 2006 10:25:53 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (60 lines)
Hello Philip,

On Mar 19, 2006, at 12:20 AM, Philip Aker wrote:

> Say you have a file on your desktop called "file.txt". Then the  
> call is:
>
> 	cd ~/Desktop;zip file file.txt
>
>
> or for a folder with some ".txt" files in it:
>
> 	cd ~/Desktop;zip xxx xxx/*.txt
>
>
> or for just one file in that folder:
>
> 	cd ~/Desktop/xxx;zip ../y y.txt
>
>
> If you don't do the 'cd' portion, then the full directory path of  
> the file(s) is nested into the .zip output.

Thank you very much for your help.

I tried these commands, and they worked just as expected.  So, if I  
understand well, this means that the second argument is the "object"  
of the command, and the first argument is the name of the resulting  
zip file to which the extension (".zip") is added automatically...??

One thing I tried and could not get the expected result is to zip an  
application.  I tried:

cd ~/Desktop
zip man_viewer man_viewer.app

And this created a zip file named "man_viewer.zip"; double-clicking  
on it (in another folder), it created "man_viewer.app", but it had  
only a generic application icon (the original "man_viewer.app" is an  
AppleScript application); double-clicking on it, it did nothing...,  
and it is not an application bundle.  I guess it is this "bundle"  
format which is the cause of this problem.  Could you show me how I  
would be able to zip an application?

On the other hand, I don't understand how to use "-x" option with "- 
r" option.  For example, I would like to zip recursively a folder  
named "images", excluding ".DS_Store" files.  I tried:
zip -r images images -x \.*
or
zip -r images images -x \.DS_Store
..., to no avail.

Thank you very much in advance.

Best regards,

Nobumi Iyanaga
Tokyo,
Japan

ATOM RSS1 RSS2