Batch script to delete the list of files with specific pattern names -


i need in deleting files specific patterns in folder. example in c/program files/ have files test_1.txt,test_2.txt,test_3.txt,test_4.txt,test_5.txt. criteria delete files test_2.txt test_5.txt . thank you

for /l %%i in (2,1,6 ) ( /f "tokens=*" %%a in ('dir /b ^| findstr test_%%i') del %%a )

this worked fine me.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -