Hi all,
I have a text file that has one line:
I'm looking to create a batch file to remove the <td> at the front of the line, and also remove </td> at the end.
I've only been able to find stuff about search and replace, and I'm having a hard time understanding the code in these bigger batch files.
Any help would be appreciated. Thanks!
Ok, I think I got it. I used a bat file I found on a different forum that dealt with character deletion.
Then on another site I found out about left, right, mid and how to manipulate characters
so:
This removes the first 4 characters ( <td> )
It also removes the last 12 characters ( </td> )
I have a text file that has one line:
Code:
<td>50001~BUILD~09~TEST ONLY~Precision Dr, 3445 </td>
I've only been able to find stuff about search and replace, and I'm having a hard time understanding the code in these bigger batch files.
Any help would be appreciated. Thanks!
Ok, I think I got it. I used a bat file I found on a different forum that dealt with character deletion.
Then on another site I found out about left, right, mid and how to manipulate characters
so:
Code:
@echo off > newfile & setLocal enableDELAYedexpansion
for /f "tokens=* delims= " %%a in (boolah.dat) do (
set str=%%a
set str=!str:~4,-12!
>> newfile echo !str!
)
It also removes the last 12 characters ( </td> )