I need zip and password protect a file. I have a directory in which a file will be placed on a daily basis. I need vb code that zips and password protects the zipped filed. the zipped file will inherit the unzipped file name. the file name will be the password.
I need this code for windows server 64bit or 32 bit. I need to run it from a scheduled task.
Unfortunately my vb is crap so I'm not sure how to code it.
Just wanted to mention that its got to be vbs rather than vb
I now have some code that zips a file, but how can i modify it such that it
1) it dynamially picks the file in the directroy to zip
2) passwords protect it using the name of the file
3) works with large files
here is the code:
Const FOF_CREATEPROGRESSDLG = &H0&
Const File1 = "C:\\files\ est.txt"
Const MyZip = "C:\\files\ est.zip"
.CreateTextFile(MyZip, True) _
.Write "PK" & Chr(5) & Chr(6) & String(18, vbNullChar)
'-------------- zip ---------------------------
'get ready to add files to zip
.NameSpace(MyZip).CopyHere File1, FOF_CREATEPROGRESSDLG
This topic is now closed. New replies are no longer allowed.