Splitting a .txt file into a new .txt file newbie question
Posted: 09 Feb 2017 16:42
Hi guys, I am very new to batch codes and am self taught. I'm currently splitting a very large unique .txt file. I am outputting each unique type of data using the subsection code that is embedded into every line. I am currently using something along these lines to split each line into it's correct output .txt file.
Find string /r "^...."D currrent.txt >NAVAID.txt
From what I know this is searching for any string containing the 5th character "D" and outputting the whole line to a new .txt file called NAVAID.txt.
This is exactly what I need it to do. However, I have now run into a problem that I also need to put a similar line into another text file that looks for the 5th character to be D and the 6th B. They need to be seperate .txt files but every time I run the query it is seperacting the DB into its own file, but then selecting all the lines of text that start with D as a fifth character (including DB).
Find string /r "^...."D currrent.txt >NAVAID.txt
Find string /r "^...."DB currrent.txt >NAVAID.txt
How can I make it so that the line that references "D" will not include "DB"?
I hope that makes sense.
Thank you
Find string /r "^...."D currrent.txt >NAVAID.txt
From what I know this is searching for any string containing the 5th character "D" and outputting the whole line to a new .txt file called NAVAID.txt.
This is exactly what I need it to do. However, I have now run into a problem that I also need to put a similar line into another text file that looks for the 5th character to be D and the 6th B. They need to be seperate .txt files but every time I run the query it is seperacting the DB into its own file, but then selecting all the lines of text that start with D as a fifth character (including DB).
Find string /r "^...."D currrent.txt >NAVAID.txt
Find string /r "^...."DB currrent.txt >NAVAID.txt
How can I make it so that the line that references "D" will not include "DB"?
I hope that makes sense.
Thank you