batch script delete file containining certain chars

前端 未结 2 1302
执念已碎
执念已碎 2021-01-25 11:46

I have almost no experience in batch, but now I need a script to delete all files that contain certain characters in their names from a folder and its subfolders

2条回答
  •  闹比i
    闹比i (楼主)
    2021-01-25 12:12

    The /s switch exists on quite a few commands (including del)

    del /s "C:\TEST\TEST2\*.TXT"
    

    The help for del /? says:

    /S            Delete specified files from all subdirectories.
    

提交回复
热议问题