Jump to content
Sign in to follow this  
Mutha66

Autoit Zip with password

Recommended Posts

Mutha66

I know there are includes for zipping files in AutoIt but can it also password protect the zip file as well?

Share this post


Link to post
Share on other sites
Varian

If you use freeware rar.exe or 7z.exe (or paid winrar.exe) then you can specify the "p" switch to add a password. I am not certain with the dll version, but I would imagine that you canYou can also search for the zip32.dll UDF version...that has password protection as well

Edited by Varian

Share this post


Link to post
Share on other sites
Mutha66

Ok So I am completely new to AutoIT and learning. So far I have created a script that will copy files to usb drive successfully. What I am now looking to do is to zip up all those files into a password protected zip. I cannot seem to figure out how to do this. Could you show me a sample?>

Thanks

Share this post


Link to post
Share on other sites
Varian

Example with WinRAR because I'm lazy

$FolderToArchive = "C:\Test"
$DestinationFolder = @DesktopDir
$ArchiveName = "TestBackup"



$wCommand = @ProgramFilesDir & '\WinRAR\winrar.exe A -afzip -y -r -ep1 -m5 "' & $DestinationFolder & "\" & $ArchiveName & '" "' & $FolderToArchive & '"'

RunWait($wCommand, @TempDir)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.