Count files only
Posted: Tue Aug 25, 2009 1:37 am
I need to just count files in the current directory. Is there an argument to FilesCount so it doesn't count files in sub folders?
Thanks,
Kees
Thanks,
Kees
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|307868550
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task1586"
Hide=INTEGER|0
ID=INTEGER|-23909006
LogOnAsUser=INTEGER|1
Name=STRING|"Count files in the folder"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RestrictRESTAPIAccess=INTEGER|0
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
StepPause=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""_num"" with value ""0"""
Params=FOLDER
[Actions\Action1\Params]
_rt_variables_produced=STRING|"_num"
expand=STRING|"0"
linecount=STRING|"1"
varname=STRING|"_num"
varvalue=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER
[Actions\Action2\Params]
_rt_variables_produced=STRING|"_file"
createmode=STRING|"1"
date1=STRING|"20250922"
date2=STRING|"20250922"
destvar=STRING|"_file"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"c:\temp\*.*"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
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_VARIABLES_INCREMENT"
Enabled=INTEGER|-1
Name=STRING|"Increment variable ""_num"""
Params=FOLDER
[Actions\Action3\Params]
incement=STRING|"1"
vaiable=STRING|"_num"
[Actions\Action4]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action5]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log message (neutral) ""{_num}"""
Params=FOLDER
[Actions\Action5\Params]
expression=STRING|"3"
message=STRING|"{_num}"
mode=STRING|"0"
type=STRING|"3"