Re: creating multiple zip arhives?
- From: Adam Piggott <usenet@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 15:56:14 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
William Stokes wrote:
> Hello,
>
> I have about 2500 jpeg pictures in a different subfolders (in a same tree).
> There are about 10 pics in each folder. I need to compress these pics to a
> zip files. All pics in one subfolder to one zip file. So this means that
> there should be about 250 zip files located in the same folder where the
> original pics were.
>
> Any idea how to script this? I tried powerarchiver commandline with no luck.
> I'm not experinced enough in scripting so help is Very Much apreciated.
Depending on the directory names, something along the lines of this should
do: (which is run in the tree root and is run straight from the command line)
for /R /D %I in (*) do zip "<target path>\%~nI.zip" "%~fI\*"
I created three test directories: 1, 2 and 3. Inside all were a few dummy
files. Inside 3 was a further directory, 3a, with a dummy file in it. The
above command produced 1.zip, 2.zip, 3.zip and 3a.zip, all in the <target
path> directory. One could also add the -m switch to delete source files,
but only after careful checking of the output.
If you could be a bit more specific about the directory structure and where
you'd like the zip files to end up, the command could be tweaked if it
doesn't provide what you need. I use the zip software from Info-ZIP:
http://www.info-zip.org/
If they're on an NT partition you could always enable file compression ;-)
HTH
- --
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)
iD8DBQFDDdwN7uRVdtPsXDkRAosEAJ9+oZlV6grFb0RzGKvHKh3shIv0FACghebl
mZPvim+j0Ctlvcb3uPDT8dA=
=j1R+
-----END PGP SIGNATURE-----
.
- Follow-Ups:
- Re: creating multiple zip arhives?
- From: William Stokes
- Re: creating multiple zip arhives?
- From: William Stokes
- Re: creating multiple zip arhives?
- From: Dani
- Re: creating multiple zip arhives?
- References:
- creating multiple zip arhives?
- From: William Stokes
- creating multiple zip arhives?
- Prev by Date: creating multiple zip arhives?
- Next by Date: Re: VBscript question for windows updates
- Previous by thread: creating multiple zip arhives?
- Next by thread: Re: creating multiple zip arhives?
- Index(es):
Relevant Pages
|