惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AWS News Blog
AWS News Blog
V
Vulnerabilities – Threatpost
D
Darknet – Hacking Tools, Hacker News & Cyber Security
量子位
博客园 - 叶小钗
AI
AI
T
Tor Project blog
Forbes - Security
Forbes - Security
W
WeLiveSecurity
博客园_首页
爱范儿
爱范儿
J
Java Code Geeks
B
Blog
G
GRAHAM CLULEY
aimingoo的专栏
aimingoo的专栏
Cloudbric
Cloudbric
C
CXSECURITY Database RSS Feed - CXSecurity.com
TaoSecurity Blog
TaoSecurity Blog
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
有赞技术团队
有赞技术团队
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
H
Help Net Security
博客园 - 三生石上(FineUI控件)
C
Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
P
Palo Alto Networks Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园 - 司徒正美
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
S
Secure Thoughts
Spread Privacy
Spread Privacy
F
Fortinet All Blogs
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
About on SuperTechFans
Security Latest
Security Latest
Webroot Blog
Webroot Blog
Scott Helme
Scott Helme
Hugging Face - Blog
Hugging Face - Blog

博客园 - Eric-Liu

Docker Desktop for Windows ChatGLM本地部署 Llama本地部署 StableDiffusion本地部署 Python-CUDA-cuDNN安装 Python实现视频桌面 基于BERT进行文本分类 Python实现Windows下的视频壁纸 启用VTX技术支持启动android的虚拟机 - 报错 新机上岗 Core i7-4790 @ 3.60GHz 四核 / 16 GB ( 金士顿 DDR3 1866MHz ) / GeForce GTX 970 ( 4 GB / 七彩虹 ) VBS发送邮件-1 Oracle数据库编译存储过程挂死问题解决办法 Windows 7丢失用户、密码解决办法-我体验了! 批处理实现从Excel导入Oracle Windows Gadget开发之运行外部程序 - Eric-Liu - 博客园 VirtualBox自动重启之谜 拆分五笔字库,提高导入到google拼音的速度 写个设置命令的VBS脚本工具。 - Eric-Liu - 博客园 SQL注入之脚本篇-FOR ACCESS数据库
CMD下一个命令遍历目录删除相同垃圾文件
Eric-Liu · 2009-10-10 · via 博客园 - Eric-Liu

如果不小心安装了些制造垃圾的小工具,在系统中各个盘符下都产生了相同的垃圾文件,如我系统中就曾经有被产生了无数的desktop_1.ini 和 desktop_2.ini,当时首先想到的解决办法就是把所有的文件用windows的搜索工具找到,再一并删除,这种方法固然可以解决,但搜索的时候别忘了勾选搜索隐藏文件和隐藏文件夹,不然你是搜索不到恶意制造的垃圾文件的。
这里给出另一种简单办法,只要一个命令,也可达到同样的效果。 它遍历当前盘符并自动删除找到的文件。
命令格式:
I:\>for /F %i in ('dir desktop_1.ini desktop_2.ini /a /s /b') do (attrib -r -s -h %i && del %i)
'dir desktop_1.ini desktop_2.ini /a /s /b' 可以找出所有的desktop_1.ini和desktop_2.ini,包括隐藏文件,并以完整文件路径列出。
for /F命令对列出的结果中的每一行记录进行分析,%i为每一行的记录内容即这里的文件名完整路径, do后面的括号里是对文件名进行处理的命令集,这里可以看到先对文件进行去掉只读,系统和隐藏属性,这样就可以用删除命令del对其进行删除了。