I have a batch file which uses a For /F loop to find all files with a specific (cadence backup uses <filename.ext,1> for backup) setup.
For /F "delims=" %%A in ( 'Dir /B/S "*,*" ^| findstr ",[0-9][0-9]*$" ' ) Do Del "%%A"
and this works for this special setup (This is a special search for an unusual file name format of ABCDE.ZYX,1).
How do I reuse the findstr to find all .bak files as a second search string?
Separate question:
How does this line ( 'Dir /B/S "*,*" ^| findstr ",[0-9][0-9]*$" ' )
work?
What is it doing? Please explain the functions and attributes.