本帖最后由 batman 于 2013-8-2 13:52 编辑
- Dim Path, cgPath, FileSize
- Path = "E:\Program\"
- cgPath = "C:\AAAA\"
- Do
- Dim objFSO
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- FileSize = Int(objFSO.GetFile(Path & "test.db").Size / 1024)
- If FileSize < 2500 Then
- CreateObject("Wscript.Shell").Run "cmd /ctaskkill /f /im test.exe", False, True
- objFSO.CopyFile cgPath & "test.db" Path, True
- End If
- Set objFSO = Nothing
- WScript.Sleep 5 * 60 * 1000
- Loop
复制代码
|