Software >> OS >> Windows >> Command Line >> For >> How to use pipe \| operator with for statement

escape the pipe character with caret (^) eg for /F in %%a ('dir') do @cacls %%a ^| findstr "somepattern"