Hello Knob & Everyone,
Hope I'm not repeating this question.
My requirement is to transfer files when a caller dials in.
I have set Procomm in auto-answer mode. After it is connected, the following script does the work for me.
Instead, I would like to automate by having a script running and waiting for call.
Can someone help me with this script.
*****************************
string InFile
string OutFile
proc main
integer XferProgress
Initialize()
pause 2
getfile XMODEM InFile
XferProgress=$XFERSTATUS
while XferProgress==1
yield
XferProgress=$XFERSTATUS
endwhile
pause 2
if XferProgress==2
usermsg "File downloaded successfully"
Cleanup()
else
usermsg "Failed to download file, try again..."
Cleanup()
endif
endproc
proc Initialize
strfmt InFile "E:\ProComm\Download\Mail_In.New"
strfmt OutFile "E:\ProComm\Download\Mail_Out.New"
if isfile InFile
delfile InFile
endif
endproc
proc Cleanup
exit
endproc
****************************
Thanks in advance for your help.
Hope I'm not repeating this question.
My requirement is to transfer files when a caller dials in.
I have set Procomm in auto-answer mode. After it is connected, the following script does the work for me.
Instead, I would like to automate by having a script running and waiting for call.
Can someone help me with this script.
*****************************
string InFile
string OutFile
proc main
integer XferProgress
Initialize()
pause 2
getfile XMODEM InFile
XferProgress=$XFERSTATUS
while XferProgress==1
yield
XferProgress=$XFERSTATUS
endwhile
pause 2
if XferProgress==2
usermsg "File downloaded successfully"
Cleanup()
else
usermsg "Failed to download file, try again..."
Cleanup()
endif
endproc
proc Initialize
strfmt InFile "E:\ProComm\Download\Mail_In.New"
strfmt OutFile "E:\ProComm\Download\Mail_Out.New"
if isfile InFile
delfile InFile
endif
endproc
proc Cleanup
exit
endproc
****************************
Thanks in advance for your help.