I am trying to do a simple batch FOR loop, but I can't figure out how to use a | in the command.
FOR /F %G IN ('dir /b') DO echo %G works
FOR /F %G IN ('dir /b | findstr /v xml') DO echo %G doesn't not work
(| was unexpected at this time.)
I need to do a directory listing but exclude at least one specific file from this loop. If I run: (dir /b | findstr /v xml) then I get the desired list of files; however, I can't figure out how to use it in the FOR loop