text manipulation issue
Posted: Tue Aug 14, 2007 7:05 am
I am using robotask 2.51 and monitoring log files that are automatically added to a directory.
My goal is to have the files contents emailed to several people.
I have the file monitor creating a text file called loglist.txt
I am then taking that files contents and making it a variable {loglist}placing it into the "Put Text" "External Text File" input field as the lookup for the correct file name.
The problem I am having is with the data won't read into the variable, I belive this is because of the <CR><LF> added to the end of the text in the file monitor save changes function.
I have attached the task data, any help or suggestions is appreciated.
Error: Error occured: Cannot open file "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\backup06.log<CR><LF>". The filename, directory name, or volume label syntax is incorrect
task:
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|0
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"logmonitor"
Hide=INTEGER|0
ID=INTEGER|813242743
Name=STRING|"logmonitor"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
[Actions\Action1]
ActionID=STRING|"A_CLIPBOARD_PUT"
Enabled=INTEGER|-1
Name=STRING|"Put Text"
Params=FOLDER
[Actions\Action1\Params]
file=STRING|"G:\OBBackups\batchfiles\loglist.txt"
linecount=STRING|"0"
sourcetext=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_CLIPBOARD_GET"
Enabled=INTEGER|-1
Name=STRING|"Get Text"
Params=FOLDER
[Actions\Action2\Params]
variable=STRING|"loglist"
[Actions\Action3]
ActionID=STRING|"A_CLIPBOARD_PUT"
Enabled=INTEGER|-1
Name=STRING|"Put Text"
Params=FOLDER
[Actions\Action3\Params]
file=STRING|"{loglist}"
linecount=STRING|"0"
sourcetext=STRING|"0"
[Actions\Action4]
ActionID=STRING|"A_CLIPBOARD_GET"
Enabled=INTEGER|-1
Name=STRING|"Get Text"
Params=FOLDER
[Actions\Action4\Params]
variable=STRING|"logfiledata"
[Actions\Action5]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file G:\OBBackups\batchfiles\test.txt"
Params=FOLDER
[Actions\Action5\Params]
fileexists=STRING|"0"
filname=STRING|"G:\OBBackups\batchfiles\test.txt"
line0=STRING|"{logfiledata}"
linecount=STRING|"1"
[Events]
Event1=FOLDER
[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_FILE_MONITOR"
Params=FOLDER
[Events\Event1\Params]
chg=STRING|"0"
chga=STRING|"1"
chgsl=STRING|"1"
chgsm=STRING|"1"
chgtl=STRING|"1"
chgtm=STRING|"1"
del=STRING|"0"
folder1=STRING|"C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data"
foldercount=STRING|"1"
id=STRING|"KAHVX9TTP"
incmask=STRING|"backup*.log"
interval=STRING|"60"
listmode=STRING|"1"
mon_files=STRING|"1"
mon_folders=STRING|"0"
new=STRING|"1"
onelist=STRING|"G:\OBBackups\batchfiles\loglist.txt"
saveresults=STRING|"1"
subfolders1=STRING|"0"
My goal is to have the files contents emailed to several people.
I have the file monitor creating a text file called loglist.txt
I am then taking that files contents and making it a variable {loglist}placing it into the "Put Text" "External Text File" input field as the lookup for the correct file name.
The problem I am having is with the data won't read into the variable, I belive this is because of the <CR><LF> added to the end of the text in the file monitor save changes function.
I have attached the task data, any help or suggestions is appreciated.
Error: Error occured: Cannot open file "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\backup06.log<CR><LF>". The filename, directory name, or volume label syntax is incorrect
task:
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|0
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"logmonitor"
Hide=INTEGER|0
ID=INTEGER|813242743
Name=STRING|"logmonitor"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
[Actions\Action1]
ActionID=STRING|"A_CLIPBOARD_PUT"
Enabled=INTEGER|-1
Name=STRING|"Put Text"
Params=FOLDER
[Actions\Action1\Params]
file=STRING|"G:\OBBackups\batchfiles\loglist.txt"
linecount=STRING|"0"
sourcetext=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_CLIPBOARD_GET"
Enabled=INTEGER|-1
Name=STRING|"Get Text"
Params=FOLDER
[Actions\Action2\Params]
variable=STRING|"loglist"
[Actions\Action3]
ActionID=STRING|"A_CLIPBOARD_PUT"
Enabled=INTEGER|-1
Name=STRING|"Put Text"
Params=FOLDER
[Actions\Action3\Params]
file=STRING|"{loglist}"
linecount=STRING|"0"
sourcetext=STRING|"0"
[Actions\Action4]
ActionID=STRING|"A_CLIPBOARD_GET"
Enabled=INTEGER|-1
Name=STRING|"Get Text"
Params=FOLDER
[Actions\Action4\Params]
variable=STRING|"logfiledata"
[Actions\Action5]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file G:\OBBackups\batchfiles\test.txt"
Params=FOLDER
[Actions\Action5\Params]
fileexists=STRING|"0"
filname=STRING|"G:\OBBackups\batchfiles\test.txt"
line0=STRING|"{logfiledata}"
linecount=STRING|"1"
[Events]
Event1=FOLDER
[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_FILE_MONITOR"
Params=FOLDER
[Events\Event1\Params]
chg=STRING|"0"
chga=STRING|"1"
chgsl=STRING|"1"
chgsm=STRING|"1"
chgtl=STRING|"1"
chgtm=STRING|"1"
del=STRING|"0"
folder1=STRING|"C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data"
foldercount=STRING|"1"
id=STRING|"KAHVX9TTP"
incmask=STRING|"backup*.log"
interval=STRING|"60"
listmode=STRING|"1"
mon_files=STRING|"1"
mon_folders=STRING|"0"
new=STRING|"1"
onelist=STRING|"G:\OBBackups\batchfiles\loglist.txt"
saveresults=STRING|"1"
subfolders1=STRING|"0"