|Thank you for the batch files. I have found however that both of them only identify the first match. The first version shows a blank output file where the first few lines of the info file are blank. The second batch file however, doesn't do that but as I said only identifies the first match. |
I should have said that although no two descriptions will be identical there would be multiple matches of the file locations because many of them, though having different names, share the same directory.
In case I have done something wrong I have attached a copy of the second batch file?
Thank you for your assistance
PS It doesn't make any difference but apologies for the typo - the search string is "\s\" not ".\s\" as in my original script
:: ===== script starts here ===============
:: nextli2.bat 2013-01-23 19:23:38.98
@echo off > SampleTxtOut.txt & setLocal enableDELAYedeXpansioN
for /f "tokens=* delims= " %%a in (Sample.txt) do (
if defined F (
>> SampleTxtOut.txt echo %%a
echo %%a | find "\s\" > nul
if not errorlevel 1 (
>> SampleTxtOut.txt echo %%a & set F=Y
::====== script ends here =================