Home Page
        Orders     Downloads     Support     Contact     Deutsch
ZOC Terminal is a professional SSH Client and Terminal Emulator for Windows and macOS.
PyroBatchFTP Online Help Topic:

Script Commands → GetSync

GetSync [-rnhimuo<n>y<n>d<n>] [<filename pattern>] [, <directory pattern>]

 

The GetSync command is used to synchronize a local directory with a remote directory by downloading files. The characters (options) in the first parameter (after an initial hyphen character) control which files will be downloaded. The optional second parameter can filter files based on their names. The third parameter can limit the -r option to directories with names which match the directory pattern.

       
Option r
 

The r option will cause the command to operate on files in subdirectoires as well.

Option n
 

This option only downloads newer files (remote files that have date stamp which is later than the one of a file with same name in the local directory).

Option s
 

This option only transfers files which exist on both sides (locally and remote), but have different file sizes.

Option u
 

This option (update) downloads all remote files for which a corresponding local file alread exists (this option is ingonred if the n or s option is given).

Option m
 

The m option transfer all missing files, i.e. files which only exist on the source directory.

Option 0
 

The 0 option works in conjunction with the m option and causes a destination file with a size of 0 bytes to be treated as if it were missing (i.e. m will transfer the file, even if it exists, but when it has 0 bytes).

Option k
 

The k option will delete (kill) local files for which there is no equivalent (file with same name) on the server.

Option i
 

Ignore errors (e.g. locked files).

Option h
 

Include local hidden and system files in the list of files.

Option o<n> and y<n>
 

These options will transmit files, which have a remote file date which is older or younger than the current time minus <n> hours (see example below). The value of <n> can also be a decimal fraction of an hour, e.g. 0.5

Option d<n>
 

With this option only files will be transferred, which have a date that of exactly today minus <n> days (i.e. it will transfer files only of that single day, not files older or younger than that day).

 
If no option is given, the combination -rnm is the default.

 

The r parameter can be combined with any of the other parameters. The u and n parameters cannot be combined. The y, o and d are also mutually exlusive. The y, o or d need to be combined with n, m or u and restrict these to the given time period.

 

Files are transferred between the current local and remote directories, so you probably will need LocalChDir and RemoteChDir commands before actually starting the transfer.

 

See also: Get, GetDir, PutSync, SetSyncTimeDiff and filename/foldername patterns

 
Example:  GetSync -rnm "*"
.(Get all newer or non-existing files from server)

 
Example:  GetSync -ru "*.dat"
.(Get all existing files from server)

 
Example:  GutSync -nmy24 "*"
.(Get all files from the server which were modified within the last 24 hours)

 
Example:  GetSync -nmd1 "*"
.(Get all files which have been created or modified "yesterday")

 
Example:  GetSync -nmy48 "*"
.(Get new or missing files, but only if they changed within the last two days)

 
Example:  GetSync -rnm "*", "log*"
.(Get all newer or non-existing files from server, but only go into log subdirectories)

 
← Back to Script Commands

 

Downloads
Orders
Contact
Support
Terms of Use
Privacy Policy
pixel