| re: Command Line Escape Characters (WinZip) Options
Hi guys I wonder no answers yet ???????
Yes, I mean it, its is very simple.
whatever your password is when you are passing it from a .bat file (Its a bad idea to save any passwords in open text) Any ways still if you want to use it like that, here is the way:
Save your password in a simple text file,for e.g say MyPASS, use any TEXT editor for that. MyPASS is a filename without any extension (optional).
Make sure you have your password typed in a single line and you have pressed ENTER key at the end of line containing your password to start a new line. But not typed any thing on 2nd line. Save this file in same directory (folder MS people says it) with your .BAT file. Your bat file should have similar line to call command line wzunzip.exe
"C:\Program Files\WinZip\wzunzip.exe" -o -s C:\test.zip c:\hnd < MyPASS
This will execute wzunzip.exe to open test.zip file extract it using password saved in MyPASS file into C:\HND directory.
This technique is called "Redirecting standard input" , While executing a command if DOS interpreter finds a need to take an input from user it stops executing and wait for an input to be entered by a user.
"Lessthan" < sign is used to redirect such inputs from a pre-saved file.
Warm Regards
Harshad Dandekar
|