Internal Script Variables

Top  Previous  Next

 

Robo-FTP maintains a set of internally defined variables. These variables always begin with the % or $ symbol. You may use these variables just as you would any user variable, but assigning values to these variables using the SET or SETNUM commands is not recommended.

 

%comparedate Contains file date comparison result obtained by the FILECOMPARETO and FILECOMPAREFROM commands
%comparesizeContains file size comparison result obtained by the FILECOMPARETO and FILECOMPAREFROM commands
%currentlocaldir Contains the current local working folder
%currentlogfile Contains the current local script log file path name.
%currentsitedir Contains the current FTP site directory (as returned by FTPPWD)
%currenttracelogfileContains the current trace log file name.
%datetime Contains a formatted string with the current date and time (i.e., Sat Feb 17 11.00.22 2001)
%dbrawqueryresult Contains the raw SQL query result if the DBGETRESULTS command does not recognize or cannot parse the result into individual %db_xxxx variables.
%dbqueryrows Contains the number of rows returned on the most recent DBQUERY command SQL database query
%dbqueryvariables Contains the number of variables created during the most recent DBGETRESULTS command
%difffileid Contains a numeric representation of the type of difference found on the most recent run of the GETDIFF command
%difffilename Contains the name of a file where a difference has been found on the most recent run of the GETDIFF command
%difffilepath Contains the full path a file where a difference has been found on the most recent run of the GETDIFF command
%difffiles Contains the number of file differences found on the most recent run of the DIFF command
%difffiletext Contains a text description of the type of difference found on the most recent run of the GETDIFF command
%diffnum Contains the sequence number of the file difference returned on the most recent run of the GETDIFF command
%downloadcountContains the number of files downloaded during the previous RCVFILE command
%downloaderrors Contains the number of file I/O errors that may have occurred when downloading with the most recent RCVFILERCVFILE command
%downloadsize Contains the number of bytes in the most recent file downloaded with the RCVFILE command
%ftpdifffileid Contains a numeric representation of the type of difference found on the most recent run of the FTPGETDIFF command
%ftpdifffilename Contains the name of a file where a difference has been found on the most recent run of the FTPGETDIFF command
%ftpdifffilepath Contains the full path of a file where a difference has been found on the most recent run of the FTPGETDIFF command
%ftpdifffiles Contains the number of file differences found on the most recent run of the FTPDIFF command
%ftpdifffiletext Contains a text description of the type of difference found on the most recent run of the FTPGETDIFF command
%ftpdiffnum Contains the sequence number of the file difference returned on the most recent run of the FTPGETDIFF command
%ftpsnapshotfiles Contains the number of files examined during the most recent run of the FTPSNAPSHOT command
%ftplastresult Contains the last numeric result code from the FTP site
%ftpresultsfileContains the name of FTP command results temporary file
%lasterror Error or result code returned by the last script command run
%lasterrormsg Descriptive text of error returned by the last script command run
%nextcmd Character string obtained by CRON command
%nextfile File name obtained by GETNEXTFILE and GETFILEcommands
%nextfiledate File date obtained by GETNEXTFILE and GETFILE commands
%nextfiledatetimeFile date/time stamp obtained by GETNEXTFILE and GETFILE commands
%nextfilesize File size (in bytes) obtained by GETNEXTFILE and GETFILE commands
%nextfiletime File time stamp obtained by GETNEXTFILE and GETFILE commands
%nextfolder Optional folder name obtained by GETNEXTFILE and GETFILE commands
%nextpath Full path name obtained by GETNEXTFILE and GETFILE commands
%rscmderror Set by the RSCMDSTATUS command when an abnormal script completion is reported by Robo-FTP Server
%servertype Numeric representation of the type of server Robo-FTP has connected to
%sitedir Optional directory name obtained by GETSITEFILE and FTPGETFILE commands
%sitefile File name obtained by GETSITEFILE and FTPGETFILE commands
%sitefiledate File date stamp obtained by GETSITEFILE and FTPGETFILE commands
%sitefiledatetimeFile date/time stamp obtained by GETSITEFILE and FTPGETFILE  commands
%sitefilesize File size (in bytes) obtained by GETSITEFILE and FTPGETFILE commands
%sitefiletime File time stamp obtained by GETSITEFILE and FTPGETFILE commands
%snapshotfiles Contains the number of files examined during the most recent run of the SNAPSHOT command
%time Contains the current system time (i.e., 11.00.22)
%timedate Same as %datetime
%uploadcount Contains the number of files uploaded during the previous SENDFILE command
%uploaderrors Contains the number of file I/O errors that may have occurred when uploading with the most recent SENDFILE or RCVFILE command
%unzipcount Contains the number of files unzipped during the previous UNZIP command
%uploadsize Contains the number of bytes in the most recent file uploaded with the SENDFILE command
%zipcount Contains the number of files zipped during the previous ZIP command
$ERROR_nnPredefined $ERROR constants for use with the IFERROR command
%1 - %9Variables assigned from Shortcut Target arguments

 

Consider the following examples in which the use of an internal variable is shown.

 

GETSITEFILE

MESSAGEBOX %lastfile "Last file name received was:"

;; create a folder using current date and time

MAKEDIR %datetime

 

Details on internal script variable usage follows in additional sections.