Using the %difffileid, %difffilename, %difffilepath, %difffilesize, %diffdatetime, and %difffiletext Variables

<< Click to Display Table of Contents >>

Navigation:  Robo-FTP User's Guide > Script Programming > Internal Script Variables >

Using the %difffileid, %difffilename, %difffilepath, %difffilesize, %diffdatetime, and %difffiletext Variables

 

These variables are set as a result of running the GETDIFF script command when a difference is detected with a file in the local PC file system. GETDIFF is used after running the DIFF script command which compares baseline information obtained about the file system (using a snapshot database) with the current state of files within the file system.

 

The %difffilepath variable contains the full path name of a changed file and %difffilename just the file name itself.

 

The %diffsize variable contains the exact size of the file, in bytes.

 

The %diffdatetime variable contains the date and time of the file, using the same format as %datetime.

 

The %difffileid and %difffiletext variables contain information about how the file has changed in numeric and text formats, respectively.

 

Possible values for %difffileid are:

 

5001 = $DIFF_FILE_NOT_FOUND

5002 = $DIFF_FILE_IS_NEW

5003 = $DIFF_FILE_SIZE

5004 = $DIFF_FILE_DATETTIME

 

Possible values for %difffiletext are:

 

** File not found

** File is new

** File size has changed

** File date/time stamp has changed

 

Consider the following example where only files that have a different size are of interest.

 

DIFF

:loop

GETDIFF

IFERROR $ERROR_READ_EOF GOTO done

IFNUM!= difffileid $DIFF_FILE_SIZE GOTO loop

MESSAGEBOX %difffilename "Size of this file has changed."

GOTO loop

:done

 

 

Related command(s): DIFF

See also: %ftpdifffileid, %ftpdifffilename, %ftpdifffilepath, and %ftpdifffiletext, Internal Script Variables