Re: Compressing files using zip without directory names

From: Neil Moore (neil_at_cfconline.co.uk)
Date: 05/16/04


Date: Sun, 16 May 2004 12:45:11 +0100

Jonathan Taub wrote:
> The man page for "zip" states to use the -D option in order to exclude
> directory names in the compressed file.
>
> This however, doesn't work.
>
> Does anybody know how to compress files to a zip file without
> retaining their directory?

I think it's the -j option:

Store just the name of a saved file (junk the path), and do not
store directory names. By default, zip will store the full
path(relative to the current path).



Relevant Pages

  • Re: gzip module - help!
    ... this attempts to open a compressed file named "testfile.txt". ... the data you want to store in the file. ... GzipFile returns a file object, ... > Traceback: ...
    (comp.lang.python)
  • Re: Compressing files using zip without directory names
    ... Neil Moore wrote: ... > Jonathan Taub wrote: ... >> directory names in the compressed file. ... Take down all those naked pictures of Ernest Borgnine you've got ...
    (comp.os.linux.misc)