0
Windows findstr
コマンドを使用して文字列の完全一致を検索するにはどうすればよいですか? 例えば:私は完全一致に文字列を検索する必要はstore
ではなく stored
、storeday
などウィンドウ `findstr`コマンドを使用して文字列の完全一致を検索するには?
以下のコマンドを返しますすべての文字列、store
、stored
とstoreday
:
findstr /l /s /i /m /c:"store" "c:\test\*.txt"
完全なスクリプト:
set "manifest_folder=C:\Calc_scripts*.*"
set "file_list=C:\Search_results\Search_Input.txt"
set "outputfile=C:\Search_results\Search_results.txt"
(for /f "usebackq delims=" %%a in ("%file_list%") do (
set "found="
for /f "delims=" %%b in ('findstr /r /s /i /m /c:"%%a" "%manifest_folder%"') do (
echo %%a is found in %%~nxb
set "found=1"
)
if not defined found (
echo %%a is not found
)
))> "%outputFile%"
文字列?例えば。 findstr/l/s/i/m/c: "store" "c:\ test * .txt" –
findstr/R/S/I/M/C: "\" "C:\ test * .txt "' –
aschipfl
@DavyC:スペースを追加すると、calcスクリプトのリストで文字列を検索しているため、機能しません。 "ストア"、 "ストア"、 "ストア"、@関数(ストア)など。 –