Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Winzip Command Line over Network

Status
Not open for further replies.

scriptaddict

Programmer
Feb 8, 2005
5
US



I am running command line zip instructions in a Visual Basic 6.0 program.

The problem is the winzip command line does not work when the "Target File" or "Source File" drive path is something other than C:\.

Here is my VB code:

Dim Sourcefile4 As String
Dim TargetFile4 As String

These two do not work
'Sourcefile4 = "\\venkman\npsftp\AHP\Elig Update Request\Import.txt"
'TargetFile = "\\fletch\root\Eligibility\archpgp2\" & "TEST_EIL00.ZIP"

These two work just fine
Sourcefile4 = "c:\testzippy.txt"
TargetFile4 = "c:\testzippy2.zip"

Call Shell("C:\Program Files\WinZip\WZZIP.EXE " & TargetFile4 & " " & Sourcefile4, vbHide)


Thanks, for the help.
 
Try mapping the network drives and use the letters instead. If you are running this from a scheduled task, for instance, then create a batch file and use "net use x: \\...", for each of your drives (use a different letter for each drive, of course).

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
yes, I tried this too. but does not work either !

"x:\ahp\Elig Update Request\Import.txt"
"f:\Eligibility\archpgp\" & "TEST_EIL00.ZIP"


I also type this directly into a command window c:

c:\Program Files\Winzip\wzzip.exe "x:\ahp\Elig Update Request\Import.txt" "f:\Eligibility\archpgp\" & "TEST_EIL00.ZIP"

and get an error message "unexpected end of zip file"???
 
found the problem, I need to have double qutoes around the sourefile name because the folder name has spaces in it.
duh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top