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

[文件操作] [已解决]xp系统下,如何用bat创建文件夹的快捷方式?注意:是文件夹

[复制链接]
 楼主| 发表于 2011-10-6 20:06:58 | 显示全部楼层
或者这个代码,也可以。


  1. ...其他bat代码
  2. chkntfs /x c: d: e: f: g: h: i:


  3. cls

  4. net user Guest /active:yes



  5. cls

  6. ; 右键添加发送到桌面
  7. for /f "delims=:" %%a in ('findstr /n /b "::code" %0') do (more +%%a %0>"%temp%\mysendto.vbs")
  8. start "" "%temp%\mysendto.vbs"



  9. cls


  10. del /f /s /q %systemdrive%\windows\media\*.wav >nul 2>nul
  11. cls
  12. del /f /s /q %systemdrive%\windows\media\*.mid >nul 2>nul

  13. ...其他bat代码


  14. exit




  15. ::code
  16. Set objShell = WScript.CreateObject("WScript.Shell")
  17. strSend = objShell.SpecialFolders("SendTo")
  18. strDesk = objShell.SpecialFolders("Desktop")
  19. set objLink = objShell.CreateShortcut(strSend & "\桌面.lnk")
  20. objLink.TargetPath = strDesk
  21. objLink.WindowStyle = 3
  22. objLink.WorkingDirectory = strDesk
  23. objLink.Save

复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-18 03:04 , Processed in 0.011705 second(s), 7 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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