批处理文件删除文件夹中3天以上的所有文件 [英] batch file to delete all files from the folder which are 3 days older

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

问题描述

嗨所有技术爱好者

i我使用以下命令一切都很好它从文件夹中删除文件我只想添加另一个条件,即3天以前的文件只被删除





pushdC:\Bhaskar_Backup\ Mail_BOX&&(rmdir。/ s / q&popd)

解决方案

我在StackOverflow上找到了这个: DOS批处理文件按日期查找新文件 [ ^ ]

然后你只需要在FOR循环中删除列表并删除文件。

Hi all tech geeks
i am using the following command all is fine it deleted the files from the folder i just want to add another condition that the files which are 3 days older gets only deleted


pushd "C:\Bhaskar_Backup\Mail_BOX" && (rmdir . /s /q & popd )

解决方案

I found this on StackOverflow: DOS Batch file to find "new" files by date[^]
Then you just need to go trough the list in a FOR loop and delete the files.


这篇关于批处理文件删除文件夹中3天以上的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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