VBScript文件版本压缩管理

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

On Error Resume Next
Dim fso,fp,oApp,targetfile,c,zipfile
c=2
Set fso=CreateObject("Scripting.FileSystemObject")
targetfile="D:\Desktop\copydata"
If fso.FileExists(targetfile & ".zip") Then
Do while fso.FileExists(targetfile & c & ".zip")
c=c+1
Loop
zipfile=targetfile & c & ".zip"
Else
zipfile=targetfile & ".zip"
End If
Set fp=fso.OpenTextFile(zipfile,2,True)
fp.Write Chr(80) & Chr(75) & Chr(5) & Chr(6) & String(18,0)
fp.Close
Set oApp=CreateObject("Shell.Application")
Set fso=Nothing
Err.Clear
oApp.Namespace(zipfile).CopyHere "D:\Desktop\copydata.cmd"
WScript.Sleep 1000