Home All Groups Group Topic Archive Search About

Using Windows Script that Zip Files using Winzip



Author
5 Nov 2007 7:55 AM
M P
Is it possible? I need to zip files like in this scenario:

C:\Backup\File1.doc
C:\Backup\File2.doc
C:\Backup\File3.doc

Zip to

C:\Backup\Folder1\Files.zip

Author
5 Nov 2007 11:35 AM
McKirahan
"M P" <mponte***@gmail.com> wrote in message
news:1194249357.219860.20890@k79g2000hse.googlegroups.com...
> Is it possible? I need to zip files like in this scenario:
>
> C:\Backup\File1.doc
> C:\Backup\File2.doc
> C:\Backup\File3.doc
>
> Zip to
>
> C:\Backup\Folder1\Files.zip

7-Zip (http://www.7-zip.org/) is a (free) scriptable file compression
utility.

The following could be run from the command line:
    7za.exe a -tzip C:\Backup\Folder1\Files.zip C:\Backup\File?.doc

You could also create a text file containing a list of files
to zip and execute it this way:
    7za.exe a -tzip C:\Backup\Folder1\Files.zip @C:\Backup\Files.txt
where C:\Backup\Files.txt would contain
    C:\Backup\File1.doc
    C:\Backup\File2.doc
    C:\Backup\File3.doc

The outpit could be logged by appending the following to the command:
    >> C:\Backup\Files.log

Alternatively, depending on your needs, you could
create a text file of the commands and run it via script.
Author
5 Nov 2007 1:58 PM
M P
Show quote
On Nov 5, 7:35 pm, "McKirahan" <N***@McKirahan.com> wrote:
> "M P" <mponte***@gmail.com> wrote in message
>
> news:1194249357.219860.20890@k79g2000hse.googlegroups.com...
>
> > Is it possible? I need to zip files like in this scenario:
>
> > C:\Backup\File1.doc
> > C:\Backup\File2.doc
> > C:\Backup\File3.doc
>
> > Zip to
>
> > C:\Backup\Folder1\Files.zip
>
> 7-Zip (http://www.7-zip.org/) is a (free) scriptable file compression
> utility.
>
> The following could be run from the command line:
>     7za.exe a -tzip C:\Backup\Folder1\Files.zip C:\Backup\File?.doc
>
> You could also create a text file containing a list of files
> to zip and execute it this way:
>     7za.exe a -tzip C:\Backup\Folder1\Files.zip @C:\Backup\Files.txt
> where C:\Backup\Files.txt would contain
>     C:\Backup\File1.doc
>     C:\Backup\File2.doc
>     C:\Backup\File3.doc
>
> The outpit could be logged by appending the following to the command:
>     >> C:\Backup\Files.log
>
> Alternatively, depending on your needs, you could
> create a text file of the commands and run it via script.

Does 7zip kave advantage with winzip interms of file size to be
compressed?
Author
5 Nov 2007 2:38 PM
McKirahan
Show quote
"M P" <mponte***@gmail.com> wrote in message
news:1194271129.159805.208820@y27g2000pre.googlegroups.com...
> On Nov 5, 7:35 pm, "McKirahan" <N***@McKirahan.com> wrote:
> > "M P" <mponte***@gmail.com> wrote in message
> >
> > news:1194249357.219860.20890@k79g2000hse.googlegroups.com...
> >
> > > Is it possible? I need to zip files like in this scenario:
> >
> > > C:\Backup\File1.doc
> > > C:\Backup\File2.doc
> > > C:\Backup\File3.doc
> >
> > > Zip to
> >
> > > C:\Backup\Folder1\Files.zip
> >
> > 7-Zip (http://www.7-zip.org/) is a (free) scriptable file compression
> > utility.

[snip]

> Does 7zip kave advantage with winzip interms of file size to be
> compressed?

I have no idea.
Author
5 Nov 2007 5:27 PM
Tom Lavedas
Show quote
On Nov 5, 9:38 am, "McKirahan" <N***@McKirahan.com> wrote:
> "M P" <mponte***@gmail.com> wrote in message
>
> news:1194271129.159805.208820@y27g2000pre.googlegroups.com...
>
>
>
> > On Nov 5, 7:35 pm, "McKirahan" <N***@McKirahan.com> wrote:
> > > "M P" <mponte***@gmail.com> wrote in message
>
> > >news:1194249357.219860.20890@k79g2000hse.googlegroups.com...
>
> > > > Is it possible? I need to zip files like in this scenario:
>
> > > > C:\Backup\File1.doc
> > > > C:\Backup\File2.doc
> > > > C:\Backup\File3.doc
>
> > > > Zip to
>
> > > > C:\Backup\Folder1\Files.zip
>
> > > 7-Zip (http://www.7-zip.org/) is a (free) scriptable file compression
> > > utility.
>
> [snip]
>
> > Does 7zip kave advantage with winzip interms of file size to be
> > compressed?
>
> I have no idea.

If you have a registered copy of winzip, you can download a command
line driven add-on free and us it via the WScript.Shell's Run method.
See:

http://www.winzip.com/prodpagecl.htm

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
Author
12 Nov 2007 10:55 AM
Chris M
M P wrote:
> Is it possible? I need to zip files like in this scenario:
>
> C:\Backup\File1.doc
> C:\Backup\File2.doc
> C:\Backup\File3.doc
>
> Zip to
>
> C:\Backup\Folder1\Files.zip

X-Zip is free - it's a COM object that can be used from VBScript or
anything else that can talk to COM.

http://xstandard.com/en/documentation/xzip/

--
Chris.

AddThis Social Bookmark Button