Text files reading 2nd line
Posted: Mon Aug 01, 2005 10:40 am
I wrote a task to read the 2nd line of every file in a folder and append the 2nd line to a different file. It needs to do this for every file in the folder. The problem is it only does it for the 1st two files. Please Help me fix the problem. Thanks!
Here is the task
;**********************
;* RoboTask Task file *
;* Do not edit! *
;**********************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1261164818
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task7"
Hide=INTEGER|0
ID=INTEGER|1166573864
Name=STRING|"(1) Combine New Member .csv files for import to Quickbooks"
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
[Actions\Action1]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER
[Actions\Action1\Params]
createmode=STRING|"1"
date1=STRING|"20050731"
date2=STRING|"20050731"
destvar=STRING|"{NEWMEMBER}"
DuringDays=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\ICARE\New Members to Import to QuickBooks\*.csv"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
subdirs=STRING|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER
[Actions\Action2\Params]
destvar=STRING|"{LINE}"
file=STRING|"{NEWMEMBER}"
linecount=STRING|"0"
sourcetext=STRING|"0"
[Actions\Action3]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER
[Actions\Action3\Params]
destvar=STRING|"{LINE}"
file=STRING|"{NEWMEMBER}"
linecount=STRING|"0"
sourcetext=STRING|"0"
[Actions\Action4]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action5]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action6]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file C:\ICARE\GOPD\Quickbooks Import\QB_IMPORT_FILE.csv"
Params=FOLDER
[Actions\Action6\Params]
fileexists=STRING|"1"
filname=STRING|"C:\ICARE\GOPD\Quickbooks Import\QB_IMPORT_FILE.csv"
line0=STRING|"{LINE}"
linecount=STRING|"1"
[Actions\Action7]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
Here is the task
;**********************
;* RoboTask Task file *
;* Do not edit! *
;**********************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1261164818
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task7"
Hide=INTEGER|0
ID=INTEGER|1166573864
Name=STRING|"(1) Combine New Member .csv files for import to Quickbooks"
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
[Actions\Action1]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER
[Actions\Action1\Params]
createmode=STRING|"1"
date1=STRING|"20050731"
date2=STRING|"20050731"
destvar=STRING|"{NEWMEMBER}"
DuringDays=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\ICARE\New Members to Import to QuickBooks\*.csv"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
subdirs=STRING|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER
[Actions\Action2\Params]
destvar=STRING|"{LINE}"
file=STRING|"{NEWMEMBER}"
linecount=STRING|"0"
sourcetext=STRING|"0"
[Actions\Action3]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER
[Actions\Action3\Params]
destvar=STRING|"{LINE}"
file=STRING|"{NEWMEMBER}"
linecount=STRING|"0"
sourcetext=STRING|"0"
[Actions\Action4]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action5]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action6]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file C:\ICARE\GOPD\Quickbooks Import\QB_IMPORT_FILE.csv"
Params=FOLDER
[Actions\Action6\Params]
fileexists=STRING|"1"
filname=STRING|"C:\ICARE\GOPD\Quickbooks Import\QB_IMPORT_FILE.csv"
line0=STRING|"{LINE}"
linecount=STRING|"1"
[Actions\Action7]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"