-
I KNOW!!!!
I have asked this before and had good answers but now I'm after a different bit of info!!!
Why doesn't this work?
Code:
Function DoZip_Run(ByVal iFile%, ByVal sPath$, ByVal sFile$)
Dim sWLoc$
Dim sLLoc$
Dim sTempPath$
sWLoc = "C:\Program Files\WinZip\WZZIP.EXE"
sLLoc = sPath & "ZipFile(" & iFile & ").ZIP"
'wzzip [options] zipfile [@listfile] [files...]
'wzzip -u test @zipit.lst
sTempPath = sWLoc & " -a " & sLLoc & " @ " & sFile
Shell sTempPath
End Function
End Function
-
Quote:
Originally posted by gravyboy
Why doesn't this work?
Code:
Function DoZip_Run(ByVal iFile%, ByVal sPath$, ByVal sFile$)
Dim sWLoc$
Dim sLLoc$
Dim sTempPath$
sWLoc = "C:\Program Files\WinZip\WZZIP.EXE"
sLLoc = sPath & "ZipFile(" & iFile & ").ZIP"
'wzzip [options] zipfile [@listfile] [files...]
'wzzip -u test @zipit.lst
sTempPath = sWLoc & " -a " & sLLoc & " @ " & sFile
Shell sTempPath
End Function
End Function
For a start, your exe is spell wrong. It is suppose to be spell WinZip.exe not Wzzip.exe.
How come you have to "End Function"?
Winnt use it with cmd.exe
Win9x use it with com.exe
-
Sorry
Nitro, thanks for your reply. A couple of things...
The extra 'end function' is a mistake in pasting.
The exe is correct as it is a beta of the new command line tool.
I did get it to work by using:
Code:
Function DoZip_Run(ByVal iFile%, ByVal sPath$, ByVal sFile$)
Dim sWLoc$
Dim sLLoc$
Dim sTempPath$
Dim lRes&
Const Quote = """"
sWLoc = "C:\Program Files\WinZip\WZZIP.EXE"
sLLoc = sPath & "ZipFile(" & iFile & ").ZIP"
'wzzip [options] zipfile [@listfile] [files...]
'wzzip -u test @zipit.lst
'this works:
' shell """C:\Program Files\WinZip\WZZIP.EXE"" & " -a zippy @listfile.txt"
sTempPath = Quote & sWLoc & Quote & " -a " & sLLoc & " @ " & sFile
lRes = Shell(sTempPath)
End Function