Using the %sitefiledate, %sitefiledatetime, %sitefiletime, and %sitefilesize Variables

Top  Previous  Next

 

These internal variables are populated by the GETSITEFILE and FTPGETFILE script commands.

 

The value of %sitefiledate, like the value of %date, is in the format mm-dd-yy (i.e., 02-16-01). This format allows you the option of using the value of %sitefiledate in a file or directory name.  The more common date format mm/dd/yy (i.e. 02/16/01) is not used because the slash character is not allowed in a file or directory name.

 

The value of %sitefiledatetime, like the value of %datetime, contains a formatted date and time string (i.e., Sat Feb 17 11.00.22 2001).

 

The value of %sitefiletime, like the value of %time, is in the format hh.mm.ss (i.e., 11.00.22). This format allows you the option of using the value of %sitefiletime in a file or directory name. The more common time format hh:mm:ss (i.e. 11:00:22) form is not used because the colon character is not allowed in a file or directory name.

 

The %sitefilesize variable contains an integer string value corresponding to the size of the file in bytes (i.e., 66001).

 

The IFDATE, IFDATETIME, and IFTIME script commands may be used for conditional branching based on date and/or time values. The IFSIZE script command may be used for conditional branching based on file size.

 

Internal variables like %sitefiledate, %sitefiledatetime, and %sitefiletime variables should not be modified directly but their values may be assigned to intermediate user defined variables which are then used for data arithmetic with script commands like DATEADD, DATESUB, DATETIMEADD, DATETIMESUB

 

Important

Robo-FTP populates these internal variables by parsing the directory listings returned by the remote site. Most HTTP/HTTPS sites do not return listings in a supported format and many return no raw directory listings in response to HTTP GET requests based on slash-terminated URLs. The /listtype=2 option of the FTPLOGON command may cause the remote site to return a directory without file dates or sizes. Contact technical support if you have an urgent need related to a directory listing format that is currently unsupported.

 

 

Related command(s): GETSITEFILE, FTPGETFILE

See also: Using %sitefile and %sitedir, Using %date, %datetime, and %time, Internal Script Variables