wscript.echo "Running 3 7zip operations"
wscript.echo
Run "7z a s:\ZipOut1 s:\Test-777\*"
Run "7z a s:\ZipOut2 s:\Test-777\*"
Run "7z a s:\ZipOut3 s:\Test-777\*"
wscript.echo
wscript.echo "Completed 7z operations"
wscript.echo
wscript.echo "Files produced:"
wscript.echo
Run "cmd /c dir s:\Zipout*"
wscript.echo
wscript.echo "Done"
' Runs an external program and pipes its output to
' the StdOut and StdErr streams of the current script.
' Returns the exit code of the external program.
Function Run (ByVal cmd)
Dim sh: Set sh = CreateObject("WScript.Shell")
Dim wsx: Set wsx = Sh.Exec(cmd)
Do
Dim Status: Status = wsx.Status
WScript.StdOut.Write wsx.StdOut.ReadAll()
WScript.StdErr.Write wsx.StdErr.ReadAll()
If Status <> 0 Then Exit Do
WScript.Sleep 10
Loop
Run = wsx.ExitCode
End Function
Running 3 7zip operations
7-Zip 4.65 Copyright (c) 1999-2009 Igor Pavlov 2009-02-03
Scanning
Updating archive s:\ZipOut1.7z
Compressing Readme.txt
Compressing Windows Active Boot Disk.vmx
Compressing Windows Active Boot Disk.vmxf
Everything is Ok
7-Zip 4.65 Copyright (c) 1999-2009 Igor Pavlov 2009-02-03
Scanning
Updating archive s:\ZipOut2.7z
Compressing Readme.txt
Compressing Windows Active Boot Disk.vmx
Compressing Windows Active Boot Disk.vmxf
Everything is Ok
7-Zip 4.65 Copyright (c) 1999-2009 Igor Pavlov 2009-02-03
Scanning
Updating archive s:\ZipOut3.7z
Compressing Readme.txt
Compressing Windows Active Boot Disk.vmx
Compressing Windows Active Boot Disk.vmxf
Everything is Ok
Completed 7z operations
Files produced:
Volume in drive S is USB-1
Volume Serial Number is 2C51-AA7F
Directory of s:\
24/10/2010 04:17 PM 1,561 ZipOut1.7z
24/10/2010 04:17 PM 1,561 ZipOut2.7z
24/10/2010 04:17 PM 1,561 ZipOut3.7z
3 File(s) 4,683 bytes
0 Dir(s) 156,771,778,560 bytes free
Done