We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
The input line is too long. The syntax of the command is incorrect.
@echo off setlocal enabledelayedexpansion set inFile="C:\temp\CFR-2016-title40-vol17.xml" set outFile="C:\temp\output.csv" set req_tags=SECTNO SUBJECT P E set outLine= echo SECTNO,SUBJECT,P,E > %outFile% for %%a in (%inFile%) do ( for %%c in (%req_tags%) do ( set search_tag=%%c for /f "tokens=2 delims=>< " %%b in ('type "%%a" ^|findstr /i !search_tag!' ) do ( if [%%b] NEQ  ( rem we don't want to match /BSN if [%%b] NEQ [/BSN] ( set outline=!outline!%%b, ) ) ) ) ) rem output the values rem remove trailing , set outline=%outline:~0,-1% echo %outline%>>"%outFile%" endlocal
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Excel VBA API Loop Query Return results in excel||4||59|
|Python to .bat or Powershell||2||73|
|Windows Batch File - pass parameter with embedded space||7||44|
|SQL Server for XML PATH giving wrong results.||6||59|
Join the community of 500,000 technology professionals and ask your questions.