Skip to content
Advertisement

Unzip multiple password protected files

I’m a newbie in python. I’m trying to write a simple python script to unzip multiple password protected files in a directory. Passwords are stored in a text file.

This is what i have come up with,

JavaScript

And below is the content of passwords.txt file,

JavaScript

Running above code gives this error,

JavaScript

I’m not sure what i’m doing wrong here. Any help would be appreciated!

Advertisement

Answer

The password should be concatenated to -p, not a separate argument.

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement