本文介绍了批处理文件来删除文件夹在Windows 7早于10天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建哪些应该删除这是年龄超过10天的文件夹的所有子文件夹的批处理文件,使用Windows 7

I want to create a batch file which should delete all subfolders of a folder which are older than 10 days, using Windows 7

任何帮助将是AP preciated。

Any help would be appreciated.

推荐答案

从this回答一个非常类似的问题:

FORFILES /S /D -10 /C "cmd /c IF @isdir == TRUE rd /S /Q @path"

您应该运行从 D内的这个命令:\\学习文件夹中。它会删除这是超过10天的所有子文件夹。

You should run this command from within your d:\study folder. It will delete all subfolders which are older than 10 days.

/ S / Q RD 使得它删除文件夹,即使他们不为空,而不提示

The /S /Q after the rd makes it delete folders even if they are not empty, without prompting.

我建议你把上面的命令到一个.bat文件,并将其保存为 D:\\学习\\ cleanup.bat

I suggest you put the above command into a .bat file, and save it as d:\study\cleanup.bat.

这篇关于批处理文件来删除文件夹在Windows 7早于10天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 07:32