Hi All,
I'm looking for a better (faster) way to wash two csv's of the same format together. the two files can be matched on field 2. File "A" is complete,
file "B" contains a subset of rows to be updated.
My simplistic (s l o w ) script reads a line from b, loops through a, and writes the appropriate line to a new file. As file a is 12K lines by 45 cols, and
file b is roughly 100 lines, my script takes 10 mins.
Anybody have a better method?
Wahing together csv files
Moderators: JRL, Dorian (MJT support)
Here's a sample using DOS find to get the line number so you don't have to scan all the way through the file each time.
Code: Select all
Let>RP_WAIT=1
Let>RP_WINDOWMODE=0
Run>cmd /c dir C:\ > %temp_dir%C_Drive_List.txt
Run>cmd /c find /n /i "Windows" %temp_dir%C_Drive_List.txt > %temp_dir%C_Drive_List_Look.txt
ReadLn>%temp_dir%C_Drive_List_Look.txt,3,line
DeleteFile>%temp_dir%C_Drive_List.txt
DeleteFile>C_Drive_List_Look.txt
MDL>line
Separate>line,],LineNumber
Midstr>LineNumber_1,2,100,LineNumber
MDL>LineNumber