:A1
pushd %~1
for %%D in (*myfile*.txt) do ( for /f "tokens=1 delims=+" %%H in ("%%~nD") do (
.. do stuff
goto do
)
)
:do
..do stuff
popd
:end
In the for %%D in .. line, how to skip "*myfile*.txt files that has the word "EPQ" in them?.

Moderator: DosItHelp
glob5 wrote:In the for %%D in .. line, how to skip "*myfile*.txt files that has the word "EPQ" in them?.
Code: Select all
for %%D in (*myfile*.txt) do (
findstr "EPQ" "%%D">nul|| for /f "tokens=1 delims=+" %%H in ("%%~nD") do (
echo %%H
)
)