I'm a little new to VB. How do I parse an incoming text file and load default information from another file, and then save that information to another file? An example would be like this:
[text file]
/GL99-SWITCH-LIST WX510 04/13 0948
SWITCH LIST: 03 JOB-ID: YCY21R 13 LEAD-ID: WL
YARD 01 TRACK 014 DIR W CUT-ID:
SEQ INIT NUMB LKND YBLK TRK SPCD CNTNT *NEXT*SYS*DES*CONSIGN OBND-TRAIN TBLK SQ
001 CNW 178434 EC4T GRVR 020 H2 WX817 MCYPC 13 GRVR 01
002 UP 077034 EC4T GRVR 020 H2 WX838 MCYPC 13 GRVR 02
[end]
Now what I'm trying to do is take the incoming text file, parse out the Header part with the track number(i.e. TRACK 014) and make that the default save name with a different format, as in going fro ".txt" to something like ".lrt". I also am trying to parse out a certain section such as in EC4T. I want to take the last 3 char, and with them specify which new file to open to populate the new file with. I'm currently at a lose as I have never tried anything like this before. Any help would be greatly appreciated.
[text file]
/GL99-SWITCH-LIST WX510 04/13 0948
SWITCH LIST: 03 JOB-ID: YCY21R 13 LEAD-ID: WL
YARD 01 TRACK 014 DIR W CUT-ID:
SEQ INIT NUMB LKND YBLK TRK SPCD CNTNT *NEXT*SYS*DES*CONSIGN OBND-TRAIN TBLK SQ
001 CNW 178434 EC4T GRVR 020 H2 WX817 MCYPC 13 GRVR 01
002 UP 077034 EC4T GRVR 020 H2 WX838 MCYPC 13 GRVR 02
[end]
Now what I'm trying to do is take the incoming text file, parse out the Header part with the track number(i.e. TRACK 014) and make that the default save name with a different format, as in going fro ".txt" to something like ".lrt". I also am trying to parse out a certain section such as in EC4T. I want to take the last 3 char, and with them specify which new file to open to populate the new file with. I'm currently at a lose as I have never tried anything like this before. Any help would be greatly appreciated.