递归删除所有文件夹开始 [英] Recursively delete all folders starting with

查看:109
本文介绍了递归删除所有文件夹开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在递归删除所有开头的某个字符串中的文件夹.bat文件中写入命令。我怎么可能做到这一点?

I need to write a command in a .bat file that recursively deletes all the folders starting with a certain string. How may I achieve this ?

推荐答案

这是你正在寻找完整的答案:

This is the complete answer you are looking for:

FOR /D /R %%X IN (certain_string*) DO RD /S /Q "%%X"

很明显,您需要使用您的文件夹开始的字符串替换 certain_string

这将删除递归你问(我的意思不言而喻throught所有文件夹和子文件夹)。

This deletes RECURSIVELY as you asked (I mean it goes throught all folders and subfolders).

这篇关于递归删除所有文件夹开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆