FTPSNAPSHOT        Take a “snapshot” of the FTP site file system

Top  Previous  Next

Syntax:

FTPSNAPSHOT

[ path ] [ dbfile ] [ /options ]

Arguments:

[ filename ]

Optional variable or string defining a wildcard pattern or filename. The snapshot database will only contain rows for files in the current remote directory that match this filename or wildcard pattern.

 

[ dbfile ]

Optional variable or string defining an alternate name for the database file used to save the snapshot.  If no value is specified “snapshot_site.sql” is used by default.  If a filename is specified with no folder, the Robo-FTP program directory is used.  An error will occur if the filename contains invalid characters or if a folder is specified with no filename.

Options:

/incldirs

Search all sub-folders of the current remote directory for files matching the [ filename ] argument.

 

 

This script command is used in conjunction with the FTPDIFF and FTPGETDIFF script commands to locate individual file differences (i.e., change in size, date/time stamp) within the current folder (and optional subdirectory tree) of the remote FTP file system.

 

FTPSNAPSHOT is the first step to establish a baseline (or “snapshot”) you can later use to determine if any files changed. Details about files in the current directory that match the [ filename ] argument are saved in an SQL database file. The database file name defaults to “snapshot_site.sql” but you may name it anything you like via the [ dbfile ] argument.

 

As long as unique and consistent [ dbfile ] arguments are specified, Robo-FTP supports as many separate snapshots as you wish.

 

Consider the following example which takes a snapshot of all files in the current directory on the FTP site and any subdirectories.

 

FTPSNAPSHOT "*" /incldirs

 

In most cases FTPSNAPSHOT need only be run once. Future changes detected by the FTPDIFF command are automatically updated in the database by default.

 

The total number of files examined within the FTP site file system is saved in the %ftpsnapshotfiles script variable.

 

The FTPPWD command displays the current remote directory and the FTPCD command may be used to change the current remote directory.

 

The SNAPSHOT command provides similar functionality for the local file system.

 

Important

The success of this command depends on Robo-FTP's ability to automatically read and understand the directory listings returned by the remote site.  It is not uncommon for HTTP/HTTPS sites to fail to return any directory listings or to return listings in an unsupported format.  Contact technical support if you have an urgent need related to a directory listing format that is currently unsupported.

 

Related Command(s): FTPDIFF, FTPGETDIFF, FTPDIFFREWIND

See Also: SNAPSHOT