Using the %ftplastresult and %ftpresultsfile Variables

Top  Previous  Next

 

When sending FTP commands using the FTPCMD script command, and a multi-line response is received from the FTP site, Robo-FTP creates a temporary file and the response is written to this file. The file name is saved in an internal variable named %ftpresultsfile. If you need to retain the information in the temporary file, you should immediately copy it to another file as shown below:

 

FTPCMD "LIST"

COPY %ftpresultsfile "save_this_file"

 

The last line of any server response is also saved in %ftplastresult. In some cases, the %ftplastresult variable may be used in conjunction with the FTPSETERROR script command in order to decode a specific FTP site reply. The %ftpresultsfile variable may be used in conjunction with any Robo-FTP file oriented script command (e.g., READFILE, PRINT).

 

Refer to FTPCMD and FTPSETERROR for more details.