1.

Solve : Zip using batch file help?

Answer»

Hi,

I need to create a batch file which will take the file from specified folder and then zip it with password PROTECTION.

However, below code is not doing what I need. Please help.

@echo off
pushd "C:\Users\harsha.ganapathy\Desktop\BODS Encryption"
"C:\Program Files\WINZIP\WINZIP64.EXE" -a "C:\Users\harsha.ganapathy\Desktop\BODS Encryption\Sample.zip" -spassword -yc *.xlsx
popd

Winzip opens up with error and on clicking no, i get the zip file but without passoword protection. Need inputs.

Thanks in advance.Use the command line client.
http://www.winzip.com/downcl.htmlshould i modify anything in code. I just installed and still its the same issue.

Is it just possible to encrypt the file and not zip it.?

Just password protect the excel file?Why not password protect it in Excel before you zip it ? ?Its complicated. One of SAP Application schedules and generates report in excel and places it in portal. We need a script to AUTOMATE it to make it password protected.Quote from: harsha.ganapathy on June 16, 2016, 07:16:41 AM

should i modify anything in code. I just installed and still its the same issue.
Well you just installed a different program. So yes. You need to use the correct executable and the correct options. If you look in your Start > Programs > Winzip, you will see a help file for the Winzip Command line add-on.


Discussion

No Comment Found