clientname(computername?)の意味が正確にはわかりませんが、これで開始できます。残りは自分で追加できます。そうしないと、錆びたままになります8>)
zip = "c:\myzip.zip"
source = "G:\script\zip"
set fso = createObject("Scripting.FileSystemObject")
set shell = createObject("shell.application")
'make empty zip
set file = fso.CreateTextFile(zip, True)
file.write("PK" & chr(5) & chr(6) & string(18,chr(0)))
file.close
set objFolder = shell.NameSpace(source)
set oZip = shell.NameSpace(zip)
if not oZip is nothing then
'add files to zip
oZip.CopyHere objFolder
wait_until_zipped(zip)
oZip.CopyHere "c:\ship.xml"
wait_until_zipped(zip)
'rename the zip to tar
fso.MoveFile zip, "c:\myzip.tar"
end if
'cleanup
set oZip = Nothing
set shell = Nothing
set fso = Nothing
function wait_until_zipped(zip)
set handle = fso.getFile(zip)
do
wscript.sleep 500
max = handle.size
loop while handle.size > max
end function