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

Top  Previous  Next

 

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 the SNAPSHOT script command) 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 %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! %SETdifffileid $DIFF_FILE_SIZE GOTO loop

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

GOTO loop

:done