|
-
May 25th, 2000, 03:36 PM
#1
Thread Starter
Hyperactive Member
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?
-
May 25th, 2000, 03:43 PM
#2
Try shelling it like this instead:
Code:
Shell """C:\Program Files\WinZip\WZZIP.EXE"" " & "-a zippy @listfile.txt"
Good luck!
-
May 25th, 2000, 04:22 PM
#3
Frenzied Member
or like this
Code:
Dim strTemp as String
strTemp = "C:\Program Files\WinZip\WZZIP.EXE -a zippy @listfile.txt"
Shell strTemp
-
May 25th, 2000, 04:49 PM
#4
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
-
May 25th, 2000, 04:55 PM
#5
Frenzied Member
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()
-
May 26th, 2000, 05:03 PM
#6
Thread Starter
Hyperactive Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|