I want to process all CSV files in a directory whose file name does not contain the word “summary”. Inside the command prompt, I can type the following command:
dir /b my_dir\*.csv | find /V "summary"
When I try to transfer the above command into a batch file, I run into the problem that the pipe command is not supported in the for loop. That means that I cannot do the following:
FOR /f %%A in ('dir /b my_dir\*.csv | find /V "summary"') do (
rem want to do something here
)
Can somebody shed some light to me on how to solve the problem above?
for /fin DOS. cmd.exe and DOS are completely different things