DIFF        Look for differences in the local PC file system

Top  Previous  Next

Syntax:

DIFF

[ path ] [ dbfile ] [ /options ]

Arguments:

[ path ]

Optional Variable or string defining the starting local path from which to begin looking for differences; if omitted, the current working folder is used and [ dbfile ] defaults to “snapshot_local.sql”.

 

[ dbfile ]

Optional Variable or string defining an alternative to the default “snapshot_local.sql” database file where a previous snapshot has been saved.

Options:

/incldirs

Look for differences in the current or specified folder and all subfolders thereunder.

 

/noupdate

Do not update the snapshot with differences found.

 

 

This script command is used in conjunction with the SNAPSHOT and GETDIFF script commands to locate individual file differences (i.e., change in size, date/time stamp) within a specified folder (and optional subfolder) tree within the local PC file system.

 

SNAPSHOT is the first step to establish a baseline (or “snapshot”) of the specified folder(s) from which to determine if any file(s) change. DIFF is used subsequently to compare the current state of the file system with what was saved in [ dbfile ]. Any changes found are saved back into the same database file (to be processed using the GETDIFF command) and the original snapshot is updated to reflect the current state of the file system (unless this is suppressed by the inclusion of the /noupdate option.

 

If the [ dbfile ] argument is specified it must be the name of a database file previously created by the SNAPSHOT command. If omitted the default “snapshot_local.sql” file is used.

 

Consider the following example which compares the current working folder and any subfolders with the snapshot saved in the default “snapshot_local.sql” file.

 

DIFF "*.*" /incldirs

 

The total number of differences found in the local PC file system is saved in the %difffiles script variable.

 

Related Command(s): DIFFREWIND, GETDIFF, SNAPSHOT