-
I have the Beta of the Winzip Command Line thingy. My question is this...
If I type the following in the in Start,Run
"C:\Program Files\WinZip\WZZIP.EXE" -a zippy @listfile.txt
it works BUT when I try to 'shell' it from vb with
Code:
Shell "'C:\Program Files\WinZip\WZZIP.EXE'" & "-a zippy @listfile.txt"
it doesn't. Why?
-
Try shelling it like this instead:
Code:
Shell """C:\Program Files\WinZip\WZZIP.EXE"" " & "-a zippy @listfile.txt"
Good luck!
-
or like this
Code:
Dim strTemp as String
strTemp = "C:\Program Files\WinZip\WZZIP.EXE -a zippy @listfile.txt"
Shell strTemp
-
I'm sorry mark but you have to use quotes around the path because there are spaces in it.
Code:
Dim strTemp as String
strTemp = """C:\Program Files\WinZip\WZZIP.EXE"" -a zippy @listfile.txt"
Shell strTemp
-
Whoops!
Sorry about that slight oversight on my part ;)
But I meant use a variable so you can see exactly what is being passed to shell()
-
Thanks
Big thanks to everyone! I should have thought of it myself-I use similar structure when contructing SQL strings to open recordsets! Joacim's suggestion was bob on.