Results 1 to 3 of 3

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

    Angry

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



  2. #2
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633
    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
    Chemically Formulated As:
    Dr. Nitro

  3. #3

    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

    Lightbulb 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
    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