I am writing a batch file where I need to list all the directories except those called “pdf”.
This is a simple example of what I currently have, returning all directories:
for /r /d %%D in ("*") do (
echo %%D
)
Is there an equivalent to:
for /r /d %%D not in ("pdf") do (
echo %%D
)
When I try that I get the following output:
"not was unexpected at this time."
C:\txt-in\for /r /d %D not in ("pdf") do (
Easiest way is probably