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 → PutSync

PutSync [-rhlnmuo<n>y<n>d<n>] [<file pattern>] [, <directory pattern>]

 

The PutSync command is used to synchronize a remote directory with a local directory by transferring files from the local to the remote directory. The characters (options) in the first parameter after the hyphen control which files will be uploaded. 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 a
 

The a option will include all files into the transfer which have the Windows archive file attribute set and will reset the archive flag after successful transfer. This option is usually used to backup files. (Combination of a with other PutSync options (except r) usually does not make much sense).

Option r
 

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

Option h
 

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

Option l
 

The l converts file names to lowercase.

Option n
 

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

Option s
 

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

Option u
 

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

Option m
 

The m option sends all missing files, i.e. files which only exist on the local directory but are missing on the remote.

Option 0
 

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

Option k
 

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

Option i
 

Ignore errors (e.g. locked files).

Option o<n> and y<n>
 

The o<n> and y<n> options will transmit files, which have a local file date which is older or younger than the current time minus <n> hours (see examples below)

Option d<n>
 

With d<n> only files will be transferred, which have a date that is 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. Also the y, o and y are mutually exlusive. If y, o or y are combined with n, m or u they 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: Put, PutDir, GetSync, SetSyncTimeDiff and filename and directory patterns

 
Example:  PutSync "*.html"
.(Send all newer or missing html files to the server)

 
Example:  PutSync -u "*.dbf"
.(Update all copies of local dbf files on the server)

 
Example:  PutSync -rnmk "*"
.(Full sync from local to server)

 
Example:  PutSync -nmy24 "*"
.(Send all files to the server which were modified within the last 24 hours)

 
Example:  PutSync -md1 "*"
.(Send all files which are not yet on the server and which have a date stamp of "yesterday")

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

 
Example:  PutSync -rnm "*", "[*; ~temp*]"
.(Put all newer or non-existing files on server, but leave out 'temp*' subdirectories)

 
Example:  PutSync -a "*.dbf"
.(Backup all dbf files which were modified since the last run)

 
← Back to Script Commands

 

Downloads
Orders
Contact
Support
Terms of Use
Privacy Policy
pixel