Page 1 of 1
Add Date & Time in txt-file
Posted: Tue May 13, 2008 1:37 am
by Agda Drift
Is it possible to add date and time in the textfile before the the text you define in the task "Write to text file". I want to create i simple logfile from the task.
Add Date & Time in txt-file
Posted: Tue May 13, 2008 1:58 am
by Oleg
Yes, of course. Just insert {DateTime} string before your text line.
You can find more variables here: menu Options -> Variables
Also see a simple example below:
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|700197831
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task613"
Hide=INTEGER|0
ID=INTEGER|1197903318
Name=STRING|"Simple Log File"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
[Actions\Action1]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file c:\simpleLog.txt"
Params=FOLDER
[Actions\Action1\Params]
fileexists=STRING|"1"
filname=STRING|"c:\simpleLog.txt"
line0=STRING|"{DateTime}; My text "
linecount=STRING|"1"