Remove known password from zip files

Soldato
Joined
25 Nov 2004
Posts
3,792
Hi all

I have a requirement to remove a password set on a number of zip files (the password is known). Does anyone know if this is possible and more so, via cli?

Thanks!
 
About the best you'd be able to do use a CLI tool (7zip is free) to extract and then add them to the same archive (in a different folder) without the password.
Once you set a password the whole archive uses that password for everything so it's not just some header you have to remove.
See, for instance, the answers here.
https://superuser.com/questions/550097/remove-known-password-from-zip-archive-without-extracting
Might be best off looking for Powershell examples as what you really want is a pipe which takes the output of one command and sends it to the next command (in a 'nix kind of way) and normal Windows CLI isn't that great at that I think whereas Powershell is good at those.
https://docs.microsoft.com/en-us/po....archive/compress-archive?view=powershell-7.1
https://docs.microsoft.com/en-us/po...ll.archive/expand-archive?view=powershell-7.1
 
That is what I expected and told my boss but I wanted to make sure I wasn't talking from a place of ignorance. All this rigmarole to avoid telling a client to install 7zip lol.

Thanks for the help guys much appreciated :)
 
Back
Top Bottom