Re: creating multiple zip arhives?
- From: Adam Piggott <usenet@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 29 Aug 2005 16:09:51 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
William Stokes wrote:
> OK I tested the script and it works but it's not quite what I meant. It
> creates the folder structure of the source folder in to the zip which is
> something our web application cannot handle. I meant that only the jpegs are
> put to the zip file. Also it would be better that the resulting zip is
> created to the jpeg source directory to avoid misunderstandings with our
> naming policies. Some source folders might have very similar names. Not
> identical though.
for /R /D %I in (*) do zip -j "%~fI\%~nI.zip" "%~fI\*"
for <recursive> <work with directory names> <set directory name to %I> in
<all files> do zip <junk directory tree> "<directory path>\<directory
name>.zip" "<directory path>\*"
I tried that on the same dummy tree I mentioned earlier, and got this:
1\1.zip
2\2.zip
3\3.zip
3\3a\3a.zip
Which I think is what you're after. The -j in the zip command sets it to
"junk" the directory structure. If you're not getting much compression out
of the files, you might want to use -<n> to set the compression level. -0
will just store the files (quickest), -3 gets an average compress/CPU time
ratio and -9 will compress as much as possible.
Cheers
- --
Adam Piggott, Proprietor, Proactive Services (Computing).
http://www.proactiveservices.co.uk/
Please replace dot invalid with dot uk to email me.
Apply personally for PGP public key.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
iD8DBQFDEyU+7uRVdtPsXDkRAl8gAKCFTWQ+HRuGCCMi/yL8kYuA9OTOIwCeImut
iVZxxb+DTjUdbcamyToNNQo=
=Z3Nh
-----END PGP SIGNATURE-----
.
- Follow-Ups:
- Re: creating multiple zip arhives?
- From: William Stokes
- Re: creating multiple zip arhives?
- References:
- creating multiple zip arhives?
- From: William Stokes
- Re: creating multiple zip arhives?
- From: Adam Piggott
- Re: creating multiple zip arhives?
- From: William Stokes
- creating multiple zip arhives?
- Prev by Date: RE: share permissions
- Next by Date: What's this 0000:40cbaecb problem and How to solve it??
- Previous by thread: Re: creating multiple zip arhives?
- Next by thread: Re: creating multiple zip arhives?
- Index(es):
Relevant Pages
|