zip -r

hello,

normally zip -r works fine for me but this code will return zip file structure invalid error:


zip -r directory.named.foo directory.named.foo


if the name of the directory did not include the "." there would be no issue. i see in man zip that the "." is not recommended with the -r flag but i couldn't quite figure out the alternative. i see the finder can do it so i'm sure there must be a way. 🙂 any help is appreciated.

thanks,

rick

macbook, Mac OS X (10.5.8)

Posted on Aug 26, 2009 9:10 AM

Reply
6 replies

Aug 26, 2009 9:22 PM in response to rick722


$ mkdir directory.named.foo
$ touch !$/file1
touch directory.named.foo/file1
$ zip directory.named.foo directory.named.foo
zip warning: missing end signature--probably not a zip file (did you
zip warning: remember to use binary mode when you transferred it?)
zip error: Zip file structure invalid (directory.named.foo)
$ zip directory.named.foo.zip directory.named.foo
adding: directory.named.foo/ (stored 0%)
$ touch directory.named.foo/file2
$ zip -r directory.named.foo.zip directory.named.foo
updating: directory.named.foo/ (stored 0%)
adding: directory.named.foo/file1 (stored 0%)
adding: directory.named.foo/file2 (stored 0%)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

zip -r

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.