Batch to read a file

December 7, 2009 at 02:44:28
Specs: Windows XP, 512
Hi ,

I need to search a string say "ab" in list of files in a directory and write the names fo the file which do not contain the string. Usually we use findstr/m for getting the filenames that contain the string but noe i need to do vice versa please help as am new to this batch programming

thanks in advanmce.. please reply asap...

See More: Batch to read a file

Report •

December 7, 2009 at 03:42:03
@echo off > newfile & setLocal enableDELAYedexpansion

for /f "tokens=* delims= " %%a in ('dir/b/a-d') do (
find "ab" < %%a > nul
if errorlevel 1 (
>> newfile echo %%a

Helping others achieve escape felicity


Report •

December 14, 2009 at 00:42:00
thanks a lot.... it helps.....

Report •

Related Solutions

Ask Question