SNAPSHOT        Update current state from the local file system

<< Click to Display Table of Contents >>

Navigation:  Robo-FTP User's Guide > Script Programming > Script Commands > All Script Commands >

SNAPSHOT        Update current state from the local file system

Syntax:

SNAPSHOT

[ path ] [ dbfile ] [ /options ]

Arguments:

[ path ]

Optional Variable or string defining the starting remote path from which to match files; if omitted, the current remote folder is searched and [ dbfile ] defaults to “snapshot_site.sql”.

 

[ dbfile ]

Optional Variable or string specifying a snapshot database file. If omitted, the default value is “snapshot_site.sql”. This argument may only be specified if [ path ] is also specified. When [ dbfile ] is specified without a full path the alternate default path is used.

Options:

/subdirs

Descend into sub-folders below the folder specified in the [ path ] argument

 

/noupdate

Do not update the database with differences found.

 

/isitem

Used to indicate that [path] (without wildcards) should be treated not as a directory to search but as an individual item to snapshot into the database.

 

 

Note

Robo-FTP offers numerous commands for monitoring for files and iterating over directory structures on local and remote servers. There is significant overlap in capabilities between these commands, but there are also important differences that often make one command better suited to a particular task than the others. Please see the chapter Monitoring for Files and Iterating over Directory Structures for a description of these commands and recommendations for which commands to use in a particular situation.

 

This commands is for advanced users only. If you don't understand what it does you probably don't need it. It provides for advanced manipulation of the DIFF database. It is used to update the current state in the database so that future differences for matching items will come from the current state rather than from the last time differences were checked.

 

The total number of differences found in the remote site file system is saved in the %snapshotfiles internal variable.

 

Note: Snapshot database files are small SQLite database files created by Robo-FTP to support the DIFF and FTPDIFF family of script commands.

 

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. Most HTTP/HTTPS sites do not return listings in a supported format and many return no raw directory listings in response to HTTP GET requests based on slash-terminated URLs. Some servers respond to HEAD requests and are partially compatible. Some supported HTTP listing types like APACHE_DEFAULT include file sizes rounded to the nearest megabyte or kilobyte and are therefore not fully compatible with this command. Contact technical support if you have an urgent need related to a raw directory listing format that is currently unsupported.

 

 

Related command(s): GETDIFF, DIFFREWIND, DIFF, FILECOMEPAREFROM, SYNC

See also: Using the built-in database engine, Processing Dynamic Folders, Alternate Default Path