IFTIME Conditional branch upon time comparison |
Top Previous Next |
Form 1
Form 2
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.
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 |