returncode=msgbox ("mount a 3.5 diskette for backup",65,"backup start"
if returncode=1 then
Set ss = CreateObject("WScript.Shell"
ss.run "COMMAND /C C:\util\pkzip.exe a:master77.zip y:\rds\rds77\master.txt ",1,TRUE
set ss = nothing
msgbox "backup is done please remove the diskette",64,"backup finished"
end if
I found WinZip's command line extension quite useful (then you're not limited to 8 char names):
Dim myObjFSO
Set myObjFSO = CreateObject("scripting.filesystemobject"
CheckFolder "C:\source"
Sub CheckFolder(strPath)
Dim objFolder
Dim objFile
Dim objSubdirs
Dim objLoopFolder
Set objFolder = myObjFSO.GetFolder(strPath)
'Do what you need to do below
For Each objFile In objFolder.Files
If UCase(Right(objFile.Name, 4)) = ".LOG" Then
Set MyObj=CreateObject("WScript.Shell"
Msgbox "C:\source\WZZIP.EXE test.zip " & strPath &"\"& objFile.Name
MyObj.Run "C:\source\WZZIP.EXE test.zip " & strPath &"\"& objFile.Name
End If
Next
'Loop through all subdirectories and do the same thing (if required).
Set objSubdirs = objFolder.SubFolders
For Each objLoopFolder In objSubdirs
CheckFolder objLoopFolder.Path
Next
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.