I need to use RoboTask to do the move/copy files daily from 1 folder to another.
The problem here is how can I move/copy those files based on the yesterday date?
Please help.
Thanks.
How to move/copy files on yesterday date?
How to move/copy files on yesterday date?
See the example below.
This task make the list with files modified yesterday in c:\incoming folder.
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|435362470
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task1062"
Hide=INTEGER|0
ID=INTEGER|523007755
LocalVariables=STRING|"c_file,c_date,list"
LogOnAsUser=INTEGER|1
Name=STRING|"Yesterday files"
OnErrorTaskID=INTEGER|0
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
Action8=FOLDER
[Actions\Action1]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER
[Actions\Action1\Params]
createmode=STRING|"3"
createormodified=STRING|"1"
date1=STRING|"20110402"
date2=STRING|"20110402"
destvar=STRING|"C_FILE"
DuringDays=STRING|"2"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\incoming\*.*"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
subdirs=STRING|"1"
timesize=STRING|"1"
timevar=STRING|"C_DATE"
WithoutPath=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"2"
type=STRING|"2"
value1=STRING|"{c_date}"
value2=STRING|"{DateIncDays(-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|"5"
type=STRING|"2"
value1=STRING|"{c_date}"
value2=STRING|"{Date}"
[Actions\Action4]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""LIST"" with value ""{list}{EOL}{c_file}"""
Params=FOLDER
[Actions\Action4\Params]
expand=STRING|"1"
varname=STRING|"LIST"
varvalue=STRING|"{list}{EOL}{c_file}"
[Actions\Action5]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[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 ""Yesterday files:"""
Params=FOLDER
[Actions\Action8\Params]
icon=STRING|"1"
msg0=STRING|"Yesterday files:"
msg1=STRING|"{list}"
msgcount=STRING|"2"
playsound=STRING|"0"
showmessage=STRING|"1"
This task make the list with files modified yesterday in c:\incoming folder.
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|435362470
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task1062"
Hide=INTEGER|0
ID=INTEGER|523007755
LocalVariables=STRING|"c_file,c_date,list"
LogOnAsUser=INTEGER|1
Name=STRING|"Yesterday files"
OnErrorTaskID=INTEGER|0
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
Action8=FOLDER
[Actions\Action1]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER
[Actions\Action1\Params]
createmode=STRING|"3"
createormodified=STRING|"1"
date1=STRING|"20110402"
date2=STRING|"20110402"
destvar=STRING|"C_FILE"
DuringDays=STRING|"2"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\incoming\*.*"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
subdirs=STRING|"1"
timesize=STRING|"1"
timevar=STRING|"C_DATE"
WithoutPath=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"2"
type=STRING|"2"
value1=STRING|"{c_date}"
value2=STRING|"{DateIncDays(-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|"5"
type=STRING|"2"
value1=STRING|"{c_date}"
value2=STRING|"{Date}"
[Actions\Action4]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""LIST"" with value ""{list}{EOL}{c_file}"""
Params=FOLDER
[Actions\Action4\Params]
expand=STRING|"1"
varname=STRING|"LIST"
varvalue=STRING|"{list}{EOL}{c_file}"
[Actions\Action5]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[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 ""Yesterday files:"""
Params=FOLDER
[Actions\Action8\Params]
icon=STRING|"1"
msg0=STRING|"Yesterday files:"
msg1=STRING|"{list}"
msgcount=STRING|"2"
playsound=STRING|"0"
showmessage=STRING|"1"
Last edited by Oleg on Mon Apr 04, 2011 2:37 am, edited 1 time in total.