| 1. |
Solve : Encrypt zip files within a batch file and then email? |
|
Answer» I just installed WINZIP 16.0 and the WZZIP DOS utility. I have dozens of FILES I need to ENCRYPT using predefined passwords. The format for the WZZIP file is: dir *.xls /b >mylist.txtYou could edit that file by hand and add the passwords. Doing part of the work by hand is quicker that taking three days to find a clever batch program to do the whole think in one whack.Don't know if batch is capable of e-mailing files, but you can use: Code: [Select]@echo off set /p path=Enter the Path to the Folder you Wish to Zip: cd %path% if exist password.txt set /p p=<password.txt if "%p%"=="" WZZIP zip.zip *.xls & exit WZZIP -s[%p%] zip.zip *.xls this should take the password from the first line in 'password.txt' that is located in the folder you wish to zip. If there is no password.txt it will not put a password in. Assuming that WZZIP can use wildcards. otherwise you will need to do something a little more elaberate, will post that later. Code: [Select]@echo off setlocal EnableDelayedExpantion dir *.xls /b >mylist.txt set /p p=<password.txt for /f %%G in (mylist.txt) do (WZZIP -s[%p%] zip.zip %%G) Is the OP still looking for a solution?I don't Know, hasn't posted. |
|