IFTIME Conditional branch upon time comparison
<< Click to Display Table of Contents >> Navigation: Robo-FTP User's Guide > Script Programming > Script Commands > All Script Commands > IFTIME Conditional branch upon time comparison |
Form 1
Syntax: |
IFTIMExx |
[ time1 ] [ time2 ] GOTO [ label ] |
Forms: |
IFTIME= |
[ time1 ] [ time2 ] GOTO [ label ] |
|
IFTIME< |
[ time1 ] [ time2 ] GOTO [ label ] |
|
IFTIME> |
[ time1 ] [ time2 ] GOTO [ label ] |
|
IFTIME<= |
[ time1 ] [ time2 ] GOTO [ label ] |
|
IFTIME>= |
[ time1 ] [ time2 ] GOTO [ label ] |
|
IFTIME!= |
[ time1 ] [ time2 ] GOTO [ label ] |
Arguments: |
[ time1 ] |
Variable or string defining a time in the format of hh.mm.ss or hh.mm. |
|
[ time2 ] |
Variable or string defining a time in the format of hh.mm.ss or hh.mm. |
|
[ label ] |
A valid label within the current script file which is branched to if the time condition is satisfied. |
Options: |
none |
|
Form 2
Syntax: |
IFTIMExx |
[ time ] GOTO [ label ] |
Forms: |
IFTIME= |
[ time ] GOTO [ label ] |
|
IFTIME< |
[ time ] GOTO [ label ] |
|
IFTIME> |
[ time ] GOTO [ label ] |
|
IFTIME<= |
[ time ] GOTO [ label ] |
|
IFTIME>= |
[ time ] GOTO [ label ] |
|
IFTIME!= |
[ time ] GOTO [ label ] |
Arguments: |
[ time ] |
Variable or string defining a time in the format of hh.mm.ss or hh.mm to compare against the time stamp of the file obtained with the most recently executed GETNEXTFILE, GETFILE, GETSITEFILE, or FTPGETFILE script command. |
|
[ label ] |
A valid label within the current script file which is branched to if the time condition is satisfied. |
Options: |
none |
|
|
|
|
Form1 of this command is used to compare two specified time strings in format of hh.mm.ss
or hh.mm.
Form 2 of this command is used in conjunction with the most recently executed GETNEXTFILE, GETFILE, GETSITEFILE, or FTPGETFILE command to compare the time of the file with a specified time string.
The time must be expressed in military time (hours 00 through 23), and leading zeroes are required. When times are compared, seconds are always ignored. The following are examples of valid time strings.
01.30.00 | 1:30AM |
17.30 | 5:30PM |
12.15 | 12:15PM |
Example of Form 1
The following conditional branch is taken if the current time is later than 11AM.
IFTIME> %time "11.00.00" GOTO later time
Example of Form 2
The following conditional branch is taken if a local file just obtained with the GETNEXTFILE command has a time stamp is older than 5:30PM.
GETNEXTFILE "*.txt"
IFTIME< "17.30" GOTO old file
Syntactically, no space is permitted to the left of the ‘!’, '=', '<' or '>' symbols, and a space is required to the right of these symbols.
Related command(s): IFDATETIME, IFDATE, GETNEXTFILE, GETFILE, GETSITEFILE, FTPGETFILE, DATETIMEADD, DATETIMESUB, FILECOMPARETO, FILECOMPAREFROM
See also: Comparing Local and Remote Files, Comparing File Dates and Times, Using the %date, %datetime, and %time Variables