Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


How to Handle the Multiple Downloads with pRecvFile

Keywords: 	 multiple downloads pRecvFile

When connecting to a BBS using the serial extender, I need to download an unspecified number of files using Zmodem. In Zmodem, the receiver has the capability to trigger 'automatic downloads'.

The code below 'seems' to work on my single available test case for multiple downloads.


pPutLine(port,"rz")  ;tell server to start auto d'load
While @TRUE
   While @TRUE
      lookbyte=pPeekByte(port)
      If lookbyte != -1 Then Break
   EndWhile
   If lookbyte == 13 Then Break  ;works on test case
   recok=pRecvFile(port,"zmodem","C:\temp1\*.*",0,1)
   if recok == @FALSE
      lasterr=pGetLastError(1)
      Message("File receive failed",StrCat("Error is :",@CRLF,lasterr))
      Exit
   EndIf
EndWhile

Article ID:   W15090