Find the latest modified file in a folder

Discuss RoboTask here
Post Reply
David.Marsh
Posts: 11
Joined: Mon Aug 02, 2004 3:15 am

Find the latest modified file in a folder

Post by David.Marsh »

;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|0
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task7"
Hide=INTEGER|0
ID=INTEGER|782740870
Name=STRING|"Find the latest/newest modified file in a folder."
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3

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

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create variable ""LATEST_DATETIME"" with value ""01/01/1890 12:00:00"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"LATEST_DATETIME"
varvalue=STRING|"01/01/1890 12:00:00"

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

[Actions\Action2\Params]
createmode=STRING|"1"
date1=STRING|"20040520"
date2=STRING|"20040520"
destvar=STRING|"CURRENT_FILENAME"
DuringDays=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\WINDOWS\*.*"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
subdirs=STRING|"1"
timesize=STRING|"1"
timevar=STRING|"CURRENT_DATETIME"
WithoutPath=STRING|"1"

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

[Actions\Action3\Params]
case=STRING|"0"
operator=STRING|"3"
type=STRING|"2"
value1=STRING|"{CURRENT_DATETIME}"
value2=STRING|"{LATEST_DATETIME}"

[Actions\Action4]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""LATEST_FILENAME"" with value ""{CURRENT_FILENAME}"""
Params=FOLDER

[Actions\Action4\Params]
expand=STRING|"1"
varname=STRING|"LATEST_FILENAME"
varvalue=STRING|"{CURRENT_FILENAME}"

[Actions\Action5]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""LATEST_DATETIME"" with value ""{CURRENT_DATETIME}"""
Params=FOLDER

[Actions\Action5\Params]
expand=STRING|"1"
varname=STRING|"LATEST_DATETIME"
varvalue=STRING|"{CURRENT_DATETIME}"

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

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

[Actions\Action8]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""The latest/newest file in ( C:\WINDOWS ) is ( {LATEST_FILENAME} ) modified ( {LATEST_DATETIME} )."""
Params=FOLDER

[Actions\Action8\Params]
icon=STRING|"1"
msg0=STRING|"The latest/newest file in ( C:\WINDOWS ) is ( {LATEST_FILENAME} ) modified ( {LATEST_DATETIME} )."
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

Post Reply