SyncFile

<< Click to Display Table of Contents >>

Manual > Control Reference > Other > File transfer control > Method >

SyncFile


 

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.

 


 


reference