IFSIZE Conditional branch upon file size comparison |
Top Previous Next |
Form 1
Form 2
Form 1 of this command is used in conjunction with the FILECOMPARETO and FILECOMPAREFROM script commands to test the results of a size comparison of a local file and a file on the FTP site.
Form 2 of this command is used in conjunction with the most recently executed GETNEXTFILE, GETFILE, GETSITEFILE, or FTPGETFILE command to compare the size of the file with a specified numeric value.
Description for Form 1 Possible result codes stored in %comparesize for the FILECOMPARETO command are listed below:
Possible result codes stored in %comparesize for the FILECOMPAREFROM command are listed below:
For example, the following conditional branch is taken if no file on the FTP site is found with the same name as a specified local file:
FILECOMPARETO "thatfile" IFSIZE $ERROR NO SRVR FILE EXISTS GOTO no file
Description for Form 2
The following conditional branch is taken if a local file just obtained with the GETNEXTFILE command has a size larger than 1000 bytes.
GETNEXTFILE "*.txt" IFSIZE> 1000 GOTO good 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): IFNUM, IFFILE, FILECOMPARETO, FILECOMPAREFROM, GETNEXTFILE, GETFILE, GETSITEFILE, FTPGETFILE See also: Comparing Local and Remote Files, Comparing File Dates and Times
|