Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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!

  • Administrator
  • 26,019 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!

  • Administrator
  • 26,019 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