[PA] 업무자동화/[AH]Autohotkey

AH Unzip with password

Weneedu 2020. 3. 23. 20:20

20200323 2017 

 

01Is it possible to use a AHK script to ZIP a file and have the ZIP be password protected?

"https://www.reddit.com/r/AutoHotkey/comments/8p7fly/is_it_possible_to_use_a_ahk_script_to_zip_a_file/"

 

 

02

20200318 2249

 

01 7zip을 사용한다.

1/ “https://www.7-zip.org/download.html

2/ 설치한다.

3/ 설치된 파일 중 “7za.exe”script 파일이 있는 곳에 복사한다.

※ 7-zip 명령어의 이해 : http://www.dotnetperls.com/7-zip-examples

 

02 코드

Compressed_File:="testFile.zip" ;the path of your compressed 7z file

Output_Path:= A_WorkingDir ;the path to extract files

zPw:=1234

 

RunWait %comspec% /c %A_ScriptDir%\7za.exe x -aos -p%zPw% "%Compressed_File%" -o"%Output_Path%",,hide

 

MsgBox, done

ExitApp

ESC::ExitApp

1/ aos 옵션은  

 

암호가 없다면 아래 코드 사용

;RunWait %comspec% /c %A_ScriptDir%\7za.exe x -aos "%Compressed_File%" -o"%Output_Path%",,hide