from wordpress

 

20200314 2025

 

01 암호가 없는 경우는 간단하다
zip파일을 폴더처럼 취급해서 폴더 안에 있는 파일을 복사해서 붙여넣으면 된다.
zFile:="Org.zip"
zPath:="C:\Users\ABC\Downloads\zAH\data\"
zOrg:=zPath zFile
zTarget:=zPath
Msgbox, debug : %zTarget% :20200314 2039
fso := ComObjCreate("Scripting.FileSystemObject")
If Not fso.FolderExists(zTarget)
fso.CreateFolder(zTarget)
psh := ComObjCreate("Shell.Application")
zippedItems := psh.Namespace( zOrg ).items().count
psh.Namespace( zTarget ).CopyHere( psh.Namespace( zOrg ).items, 4|16 )
ExitApp
ESC::ExitApp

 

02 암호가 있으면?

1/7zip을 쓴다.
RunWait %comspec% /c %A_ScriptDir%\7za.exe x -aos -pYourPassword "%Compressed_File%" -o"%Output_Path%",,hide
"https://autohotkey.com/board/topic/100758-download-file-unzip-it/"

 

2/unzip을 쓴다 ⇒ unzip 명령은 없다.
"https://superuser.com/questions/1023012/how-to-unzip-password-protected-zip-file-using-terminal"

 

3/AutoHotkey H-version을 쓴다

'[PA] 업무자동화 > [AH]Autohotkey' 카테고리의 다른 글

AH RegEx 이해  (0) 2020.05.10
AH COM Object Reference  (0) 2020.05.10
AH ComObj : FileSystem  (0) 2020.05.10
AH AHK_basic vs AHK_L  (0) 2020.05.10
AH 어느 버전을 써야하나  (0) 2020.05.09
Posted by Weneedu
,


출처: https://privatedevelopnote.tistory.com/81 [개인노트]