InputFile = ZipArgs(0)
TgtFile = ZipArgs(1)
Set objShell = CreateObject("Shell.Application")
Set source = objShell.NameSpace(InputFile).Items
soucnt = objShell.NameSpace(InputFile).Items.Count
CreateObject("Scripting.FileSystemObject").CreateTextFile(TgtFile, True).Write "PK" & Chr(5) & Chr(6) & String(18, Chr(0))
objShell.NameSpace(TgtFile).CopyHere(source)
Do Until objShell.NameSpace(TgtFile).Items.Count = soucnt
wScript.Sleep 3000
Loop
wScript.Sleep 3000
usage: CScript "C:\MyZipDir\xpzip.vbs" "C:\MyZipDir\temp_zip" "C:\MyZipDir\a.zip"
Macro to Zip and Unzip Files in MS Windows without Additional External Data Archiving Software
http://www.google.com.hk/url?sa=t&rct=j&q=Macro+to+Zip+and+Unzip+Files+in+MS+Windows+without+Additional+External&source=web&cd=1&ved=0CCcQFjAA&url=%68%74%74%70%3a%2f%2f%73%75%70%70%6f%72%74%2e%73%61%73%2e%63%6f%6d%2f%72%65%73%6f%75%72%63%65%73%2f%70%61%70%65%72%73%2f%70%72%6f%63%65%65%64%69%6e%67%73%31%32%2f%30%35%37%2d%32%30%31%32%2e%70%64%66&ei=NDUCU97kK4qIiQfw0YCQBg&usg=AFQjCNEJykz8nRO1aJIfY93cF59TiPTa4Q



雷达卡



京公网安备 11010802022788号







