Delete files in subfolder using batch script

后端 未结 5 1654
小鲜肉
小鲜肉 2020-12-30 14:06

I have to delete files from a sub folder with a same name. My file path is like as follows.

d:\\test\\test1\\archive\\*.txt
d:\\test\\try\\archive\\*.txt
d:\         


        
5条回答
  •  無奈伤痛
    2020-12-30 14:45

    del parentpath (or just place the .bat file inside parent folder) *.txt /s

    That will delete all .txt files in the parent and all sub folders. If you want to delete multiple file extensions just add a space and do the same thing. Ex. *.txt *.dll *.xml

提交回复
热议问题