Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

winzip batch files


  • Please log in to reply

#1
Jaytee23

Jaytee23

    New Member

  • Member
  • Pip
  • 2 posts
Hi All

:tazz:

I am trying to write a batch file that will automate zipping a number of files to a folder whilst deleting the old ones in it. I have downloaded the command line add on for win zip but need to know the batch file.

Hope you can help me

J
  • 0

Advertisements


#2
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
that plugin comes with pretty straight forward instructions on how to use the command line tool...

as far as the batch...i would assume it would look something like

*commands to zip the files you want zipped*

*commands to delete the files from their locations*

in general...
  • 0

#3
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
"C:\Program Files\WinZip\WZZIP.EXE" ziptest.zip "C:\Documents and Settings\folder\Desktop\test"

pause


del /Q "c:\documents and settings\folder\desktop\test\" 

pause

in the above code you can remove the pause...i put those so i could troubleshoot... the first line executes the winzip command....you may not need the whole path for it..but i did because of some network settings....that causes a programatical pause as the wzzip exe asks for confirmation....the second line...deletes without question the files contained in the folder
"C:\Program Files\WinZip\WZZIP.EXE" -a -m ziptest.zip "C:\Documents and Settings\dsenette\Desktop\test"

pause
this will do it all in one swoop..though...it still hase the pause from wzzip execution...this does however...remove the original Test folder from the machine
  • 0

#4
Jaytee23

Jaytee23

    New Member

  • Topic Starter
  • Member
  • Pip
  • 2 posts

"C:\Program Files\WinZip\WZZIP.EXE" ziptest.zip "C:\Documents and Settings\folder\Desktop\test"

pause
del /Q "c:\documents and settings\folder\desktop\test\" 

pause

in the above code you can remove the pause...i put those so i could troubleshoot... the first line executes the winzip command....you may not need the whole path for it..but i did because of some network settings....that causes a programatical pause as the wzzip exe asks for confirmation....the second line...deletes without question the files contained in the folder
"C:\Program Files\WinZip\WZZIP.EXE" -a -m ziptest.zip "C:\Documents and Settings\dsenette\Desktop\test"

pause
this will do it all in one swoop..though...it still hase the pause from wzzip execution...this does however...remove the original Test folder from the machine


thanks for that got it working now

Edited by Jaytee23, 10 January 2006 - 05:56 AM.

  • 0

#5
jmail137

jmail137

    New Member

  • Member
  • Pip
  • 1 posts
I am also trying to batch zip files except I have a slight variation than what is posted above.
my problem is that I have a list of files that need to be zipped up into thier own zip file
so list a:
file1.exe
file2.exe
file3.exe

becomes list b:
file1.zip
file2.zip
file3.zip

I tried using a batch file with the following

for %%1 in c:\binaries do "C:\Program Files\WinZip\Wzzip.exe" -spassword c:\temp\%%1

but it doesnt really work.
is there some loop that i am missing? a variable thats off?

could use your help in getting this to work

thanks,


I am using winzip w/ command line tool
the -spassword is command line switch to set password

i got this to work
"C:\Program Files\WinZip\Wzzip.exe" -sinfected c:\temp\test.zip *.exe
unfortunately it takes all of the files in the folder and drops them into one zip file.
not sure how to get it to run otherwise

thanks
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP