批处理之bat脚本删除指定文件外的所有文件与文件夹
发布日期:2021-09-25 21:40:44 浏览次数:14 分类:技术文章

本文共 227 字,大约阅读时间需要 1 分钟。

//删除文件for /f "delims=" %%i in ('dir %path% /a-d /s /b') do (if not %%~xi==.txt (if exist "%%i" (    del /s /a /q "%%i" >nul)))//删除文件夹for /f "delims=" %%i in ('dir %path% /ad /s /b') do (if exist "%%i" (    rd /s /q "%%i" >nul))

 

转载地址:https://blog.csdn.net/c_shell_python/article/details/106230652 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Qt实现 Http网络在线下载程序(支持断点续传功能)
下一篇:封装QML常见控件使用方法

发表评论

最新留言

哈哈,博客排版真的漂亮呢~
[***.90.31.176]2024年04月08日 11时58分45秒