Hi,
can you tell me how to download files from FMFTP without overwrite? for example:
C:\TEST contains
01.txt
02.txt
03.txt
FTP Remote directory has
01.txt
02.txt
03.txt
and 04.txt
In this case download only 04.txt file because the 1,2,3 are already in my local directory.
Please help me.
Thank you!
Dudus
FTP Download only files wich are New
Re: FTP Download only files wich are New
Dudus:
Here is the gist of the script ...
Here is the gist of the script ...
Code: Select all
fmConnectLocal "local connection id" "host" "properties"
fmConnectRemote "remote connection id" "host" "properties"
fmChangeDir "remote connection id" "path"
(optional) fmSetFileMask "remote connection id" "*.txt"
fmFileListToVar "remote connection id" "FullPath=No;IncludeFiles=Yes; IncludeFolders=No;SelectedOnly=No" "[Files]"
StrParse "[Files]" "!;" "[FilesArray]" "[FilesArrayLen]"
Loop "1" "[FilesArrayLen]" "[thisFileNumber]"
SetVar "[thisFileName]" "[FilesArray[thisFileNumber]]"
fmFileExists "local connection id" "!c:\TEST\[thisFileName]" "[Result]"
If "[Result]" "<>" "True"
fmCopyFrom "remote connection id" "[thisFileName]" "!C:\TEST" "options"
EndIf
EndLoop