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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running WZZIP from ProComm

Status
Not open for further replies.

MyFlight

Technical User
Feb 4, 2002
193
I am trying to figure out how to run WZZIP.exe (the command line interface for WinZip. I have an Aspect Script that downloads Many files and need to zip them together. . All files begin with a 7 digit number followed by an Underscore and then the text file name. I need to zip any file in "C:\Temp Data Files\Raw Data\" with 1234567_*.txt into a zip file named 1234567.zip. The Seven Digit number changes with each Account

Here is what I have have so far however it is not working.

Proc main
string Prog = "C:\Temp Data Files\Raw Data\WZZIP "
string aSuf = "*.txt"
string zSuf = ".zip c:\Temp Data Files\Raw Data\"
string sAcctNum
string startQuote = "`""
string stopQuote = "`""
sdlginput "Account" "Enter account Number:" sAcctNum
usermsg sAcctNum
; setup WZZIP Program Command String
strcat startQuote Prog
strcat startQuote sAcctNum
strcat startQuote zSuf
strcat startQuote sAcctNum
strcat startQuote aSuf
strcat startQuote stopQuote
run startQuote
endproc


If anyone has any suggestions or could point me in the right direction I would appreciate it.
 
How is it failing? Also, have you tried sending startQuote to a msgbox to verify it contains what you expect it to?
 
Hi,
For an Acct # of 12345 the script compiles the startQuote string as..."C:\Temp Data Files\Raw Data\WZZIP 12345.zip c:\Temp Data Files\Raw Data\12345*.txt"

The asterisk looks like the problem.

I'd modify the following line
string aSuf = "*.txt"
To
string aSuf = ".txt"

hope that helps.

 
I was a tad off the mark previously...
To zip files of the format 1234567_*.txt there is a MISSING UNDERSCORE character. In my previous post I thought the asterisk was being used as a portion of a filename rather than a wildcard. try changing the line ->
string aSuf = "*.txt" -> string aSuf = "_*.txt"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top