code for using a batch file to parse html (.htm) files and export values in .csv format
Can anyone suggest code for using a batch file to parse html (.htm) files and export values in .csv format.
The values required always appear in the format:
Applicant No.xxxxx
and a few lines down
Call No: xxxxx
There are multiple .htm files within the folder and I am trying to write a script to output the relevant values in .csv format from all of the files contained.
Any help would be greatly appreciated, I've been doing it manually getting through a few thousand a day but if I can crack this using a batch file its going to save me loads.
Cheers Guys,
James
Re: code for using a batch file to parse html (.htm) files and export values in .csv format
It is always recommended to avoid nested if as they become soon unreadable. So the following code performs what you want in cleaner and more friendly way.
@Echo Off
For /f "tokens=2,3 delims= " %%a in (sample.txt) Do (
If "%%a"=="ADMINS_CAS_SENS" Echo %%a %%b
If "%%a"=="OLD_PASSWORD" Echo %%a %%b
)