Re: File Saerch
Posted: Tue Aug 08, 2023 2:15 pm
Look at the example below
You should set file size to some variable in the "loop" step
Then you can compare file size with your value and do neccesary actions.
You should set file size to some variable in the "loop" step
Then you can compare file size with your value and do neccesary actions.
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1163085779
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task1040"
Hide=INTEGER|0
ID=INTEGER|935581320
LogOnAsUser=INTEGER|1
Name=STRING|"skip files more 255 bytes"
OnErrorTaskID=INTEGER|1879502808
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
StepPause=INTEGER|0
ToLog=INTEGER|2
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""folder"" with value ""d:\incoming"""
Params=FOLDER
[Actions\Action1\Params]
_rt_variables_produced=STRING|"folder"
expand=STRING|"0"
linecount=STRING|"1"
varname=STRING|"folder"
varvalue=STRING|"d:\incoming"
[Actions\Action2]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER
[Actions\Action2\Params]
_rt_variables_produced=STRING|"FileName,sz"
createmode=STRING|"1"
date1=STRING|"20230808"
date2=STRING|"20230808"
destvar=STRING|"FileName"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"{folder}\*.*"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"1"
savevar=STRING|"sz"
searchkind=STRING|"0"
sort=STRING|"0"
sortby=STRING|"0"
sortorder=STRING|"0"
subdirs=STRING|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"
[Actions\Action3]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action3\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"3"
type=STRING|"1"
value1=STRING|"{sz}"
value2=STRING|"255"
[Actions\Action4]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action4\Params]
message=STRING|"File {FileName} skipped (more than 255 bytes)"
type=STRING|"1"
[Actions\Action5]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"
[Actions\Action6]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action6\Params]
message=STRING|"File {FileName} must be processed"
type=STRING|"3"
[Actions\Action7]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action8]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"