Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I am having trouble creating a batch file to break down a text file into several smaller text files.
I have a text file that consists:
%MPFxxx
abc
def 123
ghj dfg 321
.
.
123 khl hjk
sdf gke 456
%MPFxxx
jhj 335
dgj
.
.
etc,I need to start at the first %MPFxxx and copy that line and all subsequent lines until the next %MPFxxx line into a new file. Then do the same starting at the next %MPF. And repeat until the end of the file.
Each %MPFxxx is numbered uniquely but non-sequential.
I had managed to do this in the XP command prompt using FOR /F but I have just found it is needed for a WIN98 machine so I need to start afresh.
Cheers

Thanks for that. I got to hung up in trying to do it in a batch file I forgot to consider that. It is done now.
Cheers

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |