topas100
Goto Top

Textpassagen Dateiübergreifend im Verzeichnis in .txt Dateien suchen

@echo off
cls
rem als look.bat in dem Verzeichnis anlegen, in dem es genutzt werden soll.
echo Suche Textpasage dateibergreifend in txt-Dateien in aktuellem 
echo Verzeichnis.
echo =================================================================
echo 0 > Ergebnis.txt
:LOCK10
set/p "Z=Suche: "  
echo Ergebnis der Suche nach Text "%Z%" in Datei(en) *.txt,   
echo die als ANSI gespeichert worden, wird in gefunden.txt ausgegeben.
echo -----------------------------------------------------------------
for /f "delims=" %%i in ('findstr/NC:"%Z%" *.txt') do echo %%i  
for /f "delims=" %%i in ('findstr/NC:"%Z%" *.txt') do echo %%i >> Ergebnis.txt  
rem look *.* "Textpasage" (look.bat)  
copy Ergebnis.txt + gefunden.txt gefunden.txt
set/p "tsa2=Weiter suchen? (J/N)>"  
if %tsa2% EQU J goto LOCK10
if %tsa2% EQU j goto LOCK10
if %tsa2% NEQ J goto :eof
if %tsa2% NEQ j goto :eof
:eof

Content-Key: 4465311174

Url: https://administrator.de/contentid/4465311174

Printed on: May 2, 2024 at 16:05 o'clock