Making a batch file start from a specific line of text
Posted: 17 Mar 2017 03:40
Hi new poster so go gently with me....
This is probably really simple to someone who know but I'm not that great with batch files.
Anyway I have a customer who sends us files that look like this
F3WTXINVOICES 186 201703101540145050085019607 ENTERPRISE 0000
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="eBIS_simple.xsl"?><biztalk_1 xmlns="urn:schemas-biztalk-org:biztalk/biztalk_1.xml">
<header>
<delivery>
I have a mapping that will convert the file into XML however it wont work with that top line. So I need to ignore it.
Now if they sent it in that manner every time I could do a SKIP and ignore the top line.
However sometimes they don't wrap it so the whole message just comes on line one.
So I need to be able to tell the batch file to just start reading from a specific point, ie <?xml version="1.0" ?> and ignore any previous text.
Hope that makes sense....
Any ideas?
This is probably really simple to someone who know but I'm not that great with batch files.
Anyway I have a customer who sends us files that look like this
F3WTXINVOICES 186 201703101540145050085019607 ENTERPRISE 0000
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="eBIS_simple.xsl"?><biztalk_1 xmlns="urn:schemas-biztalk-org:biztalk/biztalk_1.xml">
<header>
<delivery>
I have a mapping that will convert the file into XML however it wont work with that top line. So I need to ignore it.
Now if they sent it in that manner every time I could do a SKIP and ignore the top line.
However sometimes they don't wrap it so the whole message just comes on line one.
So I need to be able to tell the batch file to just start reading from a specific point, ie <?xml version="1.0" ?> and ignore any previous text.
Hope that makes sense....
Any ideas?