0

I'm trying to automatically zip a group of files and move them to a different location. This is the command i'm using for the script:

<WinzipPath> -a -r -en <Dest&Name>.zip <source>

Problem is that at any given moment one of the files is still being written, and when i try to zip it i get the following message which interrupts my automation: Winzip Error

Any idea on how do I ignore\skip the message via CMD? tried looking in the Winzip's Doc for more flags but couldn't find anything helpful

Another (smaller) issue is that when zipping for the first time after installing I get this message: zip statistics

Can I skip that as well?

AranZaiger
  • 61
  • 1
  • 10
  • 1
    I completely understand about not being able to use 7zip and all, even though it is open-source freeware, but corporate may not allow the use of it. However, in order to use WinZip successfully from a command line, you must install the Command-Line Add-on for WinZip. You may be able to get the UI version working, but you will definitely have an uphill battle getting it to work and is precisely why I recommended the command-line add-on for WinZip. – Leptonator Sep 21 '15 at 04:49

2 Answers2

2

Are you using WinZip or WinZip Command-line Add-on?

You will do much better when scripting to use WZZIP which is installed after installing the command-line Add-on in the WinZip folder. NOTE: You must have WinZip Professional installed first.

http://winzip.com/downcl.html

Better yet, if you have the option to use 7-zip.. Understand if you have to use WinZip, but 7-zip handles large archives and more files within an archive better (IMHO). Also, I have previously asked about 7-zip having the ability to move a file to file and the Developer of 7-zip did respond: https://stackoverflow.com/a/21209385/175063

Community
  • 1
  • 1
Leptonator
  • 3,379
  • 2
  • 38
  • 51
0

Try adding -min

<WinzipPath> -min -a -r -en <Dest&Name>.zip <source>

So you minimise the user interface, and it should not show message windows

Grantly
  • 2,546
  • 2
  • 21
  • 31