Re: creating multiple zip arhives?



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.

Thanks
-Will


"Adam Piggott" <usenet@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> kirjoitti
viestissä:430ddbf8$0$38040$5a6aecb4@xxxxxxxxxxxxxxxxxxxx
> -----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-----


.



Relevant Pages

  • Re: Zip a file
    ... but this is still a work in progress. ... file into a single source folder. ... shell.application folder object for this source folder. ... The script uses the zip file's shell.application folder object's ...
    (microsoft.public.scripting.vbscript)
  • Re: creating multiple zip arhives?
    ... > creates the folder structure of the source folder in to the zip which is ... If you're not getting much compression out ...
    (microsoft.public.scripting.wsh)
  • Re: Create folder structure inside current folder.
    ... They all have a home directory folder on the a server. ... > What we need to do is create a folder structure inside the individual ... > folder called Bill already exits. ... > Can this be done via a logon script or a script that is run locally on ...
    (microsoft.public.scripting.vbscript)
  • Can a VB script do what i want ..............?
    ... I created a post earlier about changing permissions on a users home ... drag or drop delete etc that folder structure. ... I've used this script to run at a command prompt ...
    (microsoft.public.scripting.vbscript)
  • Clean out old files from multiple subfolders
    ... Does anyone have or would be able to write a script that would ... go through a big folder structure, and only when it finds certain subfolders, ...
    (microsoft.public.scripting.vbscript)