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

AH Unzip password file

Weneedu 2020. 3. 19. 22:44

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

 

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

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