找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 19823|回复: 1

[系统相关] BAT批处理删除指定文件,要保留的文件给删除了,请求帮助

[复制链接]
发表于 2021-2-22 16:09:42 | 显示全部楼层 |阅读模式
BAT批处理删除指定文件,要保留的color tool1.0.7.5+.exe.lnk和ScalerProductline_v3.04.lnk文件给删除了,请求帮助
  1. @echo off

  2. cd /d C:\Users\Administrator\Desktop\

  3. for /f "delims=" %%i in ('dir /b /a *.*') do (

  4. if not "%%i"=="Sop.exe" (
  5. if not "%%i"=="ISP_Tool V4.5.9.exe" (
  6. if not "%%i"=="ISP_Tool_v45186.exe" (
  7. if not "%%fi"=="ScalerProductline_v3.04.exe" (

  8. if not "%%i"=="Sop.lnk" (
  9. if not "%%fi"=="color tool1.0.6.6.exe.lnk" (
  10. if not "%%fi"=="color tool1.0.7.5+.exe.lnk" (
  11. if not "%%fi"=="color tool1.0.8.4.exe.lnk" (
  12. if not "%%i"=="RTDTool.lnk" (
  13. if not "%%fi"=="ScalerProductline_v3.04.lnk" (
  14. if not "%%i"=="Sop.lnk" (
  15. if not "%%fi"=="color tool1.0.6.6.exe" (
  16. if not "%%fi"=="color tool1.0.7.5+.exe" (
  17. if not "%%fi"=="color tool1.0.8.4.exe" (

  18. del /a/Q "%%i" /f
  19. rd /q/s "%%i"

  20. )

  21. )

  22. )
  23. )
  24. )

  25. )

  26. )
  27. )
  28. )
  29. )
  30. )
  31. )
  32. )
  33. )
  34. )
复制代码
 楼主| 发表于 2021-2-22 16:11:29 | 显示全部楼层
ScalerProductline_v3.04.exe
color tool1.0.6.6.exe.lnk
color tool1.0.7.5+.exe.lnk
color tool1.0.8.4.exe.lnk
这几个文件都给删啦
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-20 19:11 , Processed in 0.030194 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表