FTP file size / date check

Discuss RoboTask here
Post Reply
rice1973
Posts: 86
Joined: Mon Jan 04, 2010 2:38 am
Location: Netherlands
Contact:

FTP file size / date check

Post by rice1973 »

Hi Oleg,

Is it possible to check if a file on FTP has a certain size? And a last upload date filter e.g. last 24 hours?

Regards,

Maurice
Robotask rules! :)
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: FTP file size / date check

Post by Oleg »

You can get file size and file date-time in FTP File loop (or SSL FTP File loop)
filesize.png
filesize.png (12.3 KiB) Viewed 16427 times
And a last upload date filter e.g. last 24 hours?
You can use filter in the FTP File Loop
Datefilter.png
Datefilter.png (42.4 KiB) Viewed 16427 times
Oleg Yershov
rice1973
Posts: 86
Joined: Mon Jan 04, 2010 2:38 am
Location: Netherlands
Contact:

Re: FTP file size / date check

Post by rice1973 »

Hi Oleg,

I have isseu with the size filter, see task below.
Size of file to check is 1.575.303 bytes. It does not respond to the settings.

p.s. Ip adress is changed.

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|686766014
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task636"
Hide=INTEGER|0
ID=INTEGER|748719424
LogOnAsUser=INTEGER|1
Name=STRING|"File check"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER

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

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

[Actions\Action2]
ActionID=STRING|"A_FTP_FILELOOP"
Enabled=INTEGER|-1
Name=STRING|"FTP File Loop"
Params=FOLDER

[Actions\Action2\Params]
createmode=STRING|"1"
date1=STRING|"20150512"
date2=STRING|"20150512"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
filenameonly=STRING|"0"
folder=STRING|"/domains/CSV/import/copy/*.csv"
kind=STRING|"0"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
sizesave=STRING|"1"
sort=STRING|"0"
sortby=STRING|"0"
sortorder=STRING|"0"
subfolders=STRING|"0"
timesave=STRING|"0"
varsize=STRING|"FTP_FILE_SIZE"
vartime=STRING|"FILETIME"

[Actions\Action3]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action3\Params]
case=STRING|"0"
operator=STRING|"5"
type=STRING|"1"
value1=STRING|"{FTP_FILE_SIZE}"
value2=STRING|"1500000"

[Actions\Action4]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//mooi"
Params=FOLDER

[Actions\Action4\Params]
comment=STRING|"mooi"

[Actions\Action5]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action6]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

[Actions\Action7]
ActionID=STRING|"A_FTP_LOGOFF"
Enabled=INTEGER|-1
Name=STRING|"FTP Log Off"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_SHEDULER"
Params=FOLDER
UnigueID=INTEGER|436225605

[Events\Event1\Params]
periodicity=STRING|"0"
startdate=STRING|"41183"
time0=STRING|"19800000"
timecount=STRING|"1"
wakeup=STRING|"0"
Robotask rules! :)
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: FTP file size / date check

Post by Oleg »

What is the problem?
The step #4 will be executed only if File Size LESS (<) than 1500000

Maybe you need to use More (>) or More or Equal (>=)?
Oleg Yershov
rice1973
Posts: 86
Joined: Mon Jan 04, 2010 2:38 am
Location: Netherlands
Contact:

Re: FTP file size / date check

Post by rice1973 »

Hi,

Working now! :)
Robotask rules! :)
Post Reply