|
Match files in two folders on the server.
syntax
SyncFile(
serverFolder1,
serverFolder2,
file
[,compareMode = "time"]
[,bCopyFileTime = T]
[,bChildFolder = T]
)
Parameters
serverFolder1
|
|
Type:
|
character
|
|
The path of the folder to be synchronized.
|
serverFolder2
|
|
Type:
|
character
|
|
The path of the folder to be synchronized.
|
file
|
|
Type:
|
character
|
|
The name of the file to sync. An asterisk (*) is allowed.
Example: "*" all files
Example) "*.txt" all text files
Example: "abc.txt" abc.txt only
|
compareMode
|
|
Type:
|
character
|
|
How to compare if they match.
"time" - Compare the file update times and copy (overwrite) the newer file to the other one as the latest file.
"size" - Compare the file sizes and copy (overwrite) the larger file as the latest file.
|
bCopyFileTime
|
|
Type:
|
Boolean
|
|
After copying (overwriting), copy the file modification date as well. If you set compareMode to "time", be sure to select T.
|
bChildFolder
|
|
Type:
|
Boolean
|
|
If the folder contains child folders, the child folders and the files in them are also matched.
|
Return Value
|
|
Type:
|
Boolean
|
|
FALSE - Failure. TRUE - Success.
|
Matches files in two folders. If a file exists in only one folder, it is copied to the other.
If a file exists in both folders, the newest file will be copied to the other according to the method selected in compareMode. (If both are newest, no copying will be done.)
Duplication is not supported.
|
reference
SendFile
ReceiveFile
CopyFile
CopyFileTime
RenameFile
DeleteFile
MakeFolder
CopyFolder
RenameFolder
DeleteFolder
BrowseFolder
SyncFile
|