Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for cnvrturl.bat

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

  1. @ECHO OFF
  2. REM Go to most recent "Favorites" directory if necessary.
  3. REM If you start this batch file in a "Favorites" directory
  4. REM this step is skipped.
  5. IF EXIST *.URL GOTO Header
  6. C:
  7. CD %windir%\PROFILES\%USERNAME%\FAVORITES
  8.  
  9. :Header
  10. REM If BOOKMARK.HTM already exists we'll just add the "favorites"
  11. REM to the existing file; but first we'll remove the closing tags
  12. IF EXIST BOOKMARK.HTM TYPE BOOKMARK.HTM | FIND /V /I "/DL" > BOOKMARK.HTM
  13. IF EXIST BOOKMARK.HTM GOTO Favorites
  14. PROMPT $L!DOCTYPE NETSCAPE-Bookmark-file-1$G
  15. %COMSPEC% /C >> BOOKMARK.HTM
  16. PROMPT $L!-- This is an automatically generated file.
  17. %COMSPEC% /C >> BOOKMARK.HTM
  18. PROMPT It will be read and overwritten.$_Do not edit! --$G
  19. %COMSPEC% /C >> BOOKMARK.HTM
  20. PROMPT $LTITLE$G's Bookmarks$L/TITLE$G
  21. %COMSPEC% /C >> BOOKMARK.HTM
  22. PROMPT $LH1$G's Bookmarks$L/H1$G
  23. %COMSPEC% /C >> BOOKMARK.HTM
  24. PROMPT $_$LDL$G$LP$G
  25. %COMSPEC% /C >> BOOKMARK.HTM
  26.  
  27. :Favorites
  28. REM Create temporary batch file URL.BAT
  29. ECHO @ECHO OFF>URL.BAT
  30. ECHO SET URL=%%1>>URL.BAT
  31. FOR %%A IN (*.URL) DO CALL ADDURL.BAT %%A
  32.  
  33. REM Footer
  34. PROMPT $L/DL$G$Lp$G
  35. %COMSPEC% /C >> BOOKMARK.HTM
  36. REM Remove temporary batch file and restore default PROMPT
  37. DEL TEMP1.BAT
  38. DEL URL.BAT
  39. PROMPT $P$G
  40.  

page last modified: 2024-04-16; loaded in 0.0187 seconds