[阅读: 820] 2006-09-17 19:24:24
Dim objFso, objCurrentFolder, objFolder, objShell
Dim strCurrentFolder, strCmd
strCurrentFolder = "c:\0day"
Set objFso = CreateObject("Scripting.FileSystemObject")
Set objCurrentFolder = objFso.GetFolder(StrCurrentFolder)
Set objShell = WScript.CreateObject ("WScript.shell")
For Each objFolder in objCurrentFolder.SubFolders
strCmd = """C:\Program Files\WinRAR\winrar.exe"" x -y " & strCurrentFolder & "\" & objFolder.Name & "\*.zip " & strCurrentFolder & "\" & objFolder.Name
objShell.Run strCmd, 1, True
Next