WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Serial
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2002:09:05:13:49:30
Last Updated: 2002:09:05:13:49:30