Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for recycled.bat

(view source code of recycled.bat as plain text)

  1. @ECHO OFF
  2. SETLOCAL
  3.  
  4. :: Parameter check
  5. IF "%1"=="" GOTO Syntax
  6. IF /I NOT "%1"=="/C" IF /I NOT "%1"=="/D" GOTO Syntax
  7. IF /I "%1"=="/D" (SET D=RD) ELSE (SET D=MD)
  8.  
  9. :: Create/delete the shortcut
  10. %D% "%UserProfile%\Start Menu\Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}"
  11.  
  12. :: Done
  13. GOTO End
  14.  
  15. :Syntax
  16. ECHO.
  17. ECHO Recycled.bat,  Version 1.00 for Windows NT 4
  18. ECHO Creates or deletes a shortcut to the "Recycle Bin" in your Start Menu
  19. ECHO.
  20. ECHO Written by Rob van der Woude
  21. ECHO http://www.robvanderwoude.com
  22. ECHO Inspired by a tip about shortcuts to IE's History
  23. ECHO by Nick Francesco at Rochester RoadRunner
  24. ECHO http://www.rochester.rr.com/articles/nick_tips/
  25. ECHO.
  26. ECHO Usage:
  27. ECHO.
  28. ECHO     %~n0  /C                     to create the shortcut
  29. ECHO     %~n0  /D                     to delete the shortcut
  30. ECHO.
  31. ECHO Tested in Windows NT 4 only
  32.  
  33. :End
  34. ENDLOCAL
  35.  

page last modified: 2024-02-26; loaded in 0.0192 seconds