FTP preserve file datetime

Discuss RoboTask here
Post Reply
sforsythe
Posts: 9
Joined: Fri Dec 12, 2014 10:33 pm

FTP preserve file datetime

Post by sforsythe »

How do you preserve the file datetime when downloading a file using FTP Download?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: FTP preserve file datetime

Post by Oleg »

Try to use FTP Synchronization (or SSL FTP Synchronization) action. It preserved date-time of downloaded file.
See the example below:

Code: Select all

 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|317955339
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task1170"
Hide=INTEGER|0
ID=INTEGER|704828913
LogOnAsUser=INTEGER|1
Name=STRING|"Preserve file date-time"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER

[Actions\Action1]
ActionID=STRING|"A_FTP_LOGON"
Enabled=INTEGER|-1
Name=STRING|"FTP Log On"
Params=FOLDER

[Actions\Action1\Params]
anonymous=STRING|"1"
host=STRING|"localhost"
passive=STRING|"1"
password=STRING|"42310383162884337286400984055142142"
port=STRING|"21"
proxykind=STRING|"0"
useproxy=STRING|"0"
username=STRING|"anonymous"

[Actions\Action2]
ActionID=STRING|"A_FTP_SYNCHRONIZE"
Enabled=INTEGER|-1
Name=STRING|"FTP Synchronization"
Params=FOLDER

[Actions\Action2\Params]
ExactCopy=STRING|"0"
IncludeMask=STRING|"sample.txt"
IncludeSubfolders=STRING|"0"
LocalFolder=STRING|"{TempDir}"
RemoteFolder=STRING|"/"
SyncMode=STRING|"1"

Maybe you are right and we need to add additional option into FTP Download and SSL FTP Download actions.

Pay attention that FTP protocol doesn't allow to change file time at FTP server.
Oleg Yershov
sforsythe
Posts: 9
Joined: Fri Dec 12, 2014 10:33 pm

Re: FTP preserve file datetime

Post by sforsythe »

FTP Sync works using remote to local.
Post Reply