Results 1 to 6 of 6

Thread: Winzip Command Line

  1. #1

    Thread Starter
    Hyperactive Member gravyboy's Avatar
    Join Date
    Jan 2000
    Location
    Where I was before . . . if you don't know then you're new!
    Posts
    334

    Question

    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?
    Matt G
    VS6 Ent SP5 @ Work
    VS6 Ent SP5 & VB.Net @ Home
    [email protected]



  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Try shelling it like this instead:
    Code:
    Shell """C:\Program Files\WinZip\WZZIP.EXE"" " & "-a zippy @listfile.txt"
    Good luck!

  3. #3
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    or like this

    Code:
    Dim strTemp as String
    strTemp = "C:\Program Files\WinZip\WZZIP.EXE -a zippy @listfile.txt"
    
    Shell strTemp
    Mark
    -------------------

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    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

  5. #5
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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()
    Mark
    -------------------

  6. #6

    Thread Starter
    Hyperactive Member gravyboy's Avatar
    Join Date
    Jan 2000
    Location
    Where I was before . . . if you don't know then you're new!
    Posts
    334

    Thumbs up 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.
    Matt G
    VS6 Ent SP5 @ Work
    VS6 Ent SP5 & VB.Net @ Home
    [email protected]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width