Re: creating multiple zip arhives?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



-----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-----
.



Relevant Pages

  • Re: creating multiple zip arhives?
    ... OK I tested the script and it works but it's not quite what I meant. ... creates the folder structure of the source folder in to the zip which is ...
    (microsoft.public.scripting.wsh)
  • Re: The Compressed (zipped) Folder is invalid or corrupted
    ... About 60 gig of data was residing in a normal folder ... To compress a file or folder on an NTFS drive ... You can only use NTFS compression for files and folders on drives ... Files and folders that are compressed using NTFS compression cannot be ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Files deleted but free space doesnt increase
    ... unchecked "Compress files in this folder" and let it work for a while. ... So is my problem that although I'm deleting hundreds of GB, ... is an NTFS volume with file compression enabled. ... echo %date% %time%> c:\test.txt ...
    (microsoft.public.windows.file_system)
  • Re: Low disc space
    ... Computer icon on the Desktop and select System Restore. ... especially if you do not store offline copies on disk. ... You will have a Local Settings folder for each User Profile. ... Enable drive level compression. ...
    (microsoft.public.windowsxp.hardware)
  • Re: backing-up
    ... Of they were too lazy to put them in the correct place. ... Do I Zip the Documents folder before or after I move the ... Yes its supposed to be but, I've found that it really does little compression basically it compress a very little but does encases it in a zip Archive, the desired files. ...
    (microsoft.public.mac.office.word)