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
Post a Comment