home *** CD-ROM | disk | FTP | other *** search
/ hobbes.nmsu.edu / 2008-06-02_hobbes.nmsu.edu.zip / dos / hpfs4dos.zip / REHPFS.BAT < prev   
DOS Batch File  |  1995-10-10  |  2KB  |  65 lines

  1. :: REhpfs.bat ==> Reload a new driver to access HPFS partitions from DOS
  2. ::                - /A Reloads Andreas Kinzler's HPFS_access
  3. ::                - /I Reloads Marcus Better's iHPFS
  4. ::                - swaps back E: and F: drive letters
  5. ::                - Reloads current driver if no arguments are issued.
  6. @echo off
  7.  
  8. :: Synchronize current ASSIGN.com version with MS-DOS's
  9. VER | FIND /I "6.20" >NUL
  10. IF ERRORLEVEL 1 echo REhpfs.bat: Works ONLY with MS-DOS v6.20
  11. IF ERRORLEVEL 1 goto _out
  12.  
  13. :: Change back drive letters to their original names
  14. CD E:\
  15. CD F:\
  16. SMARTDRV /c /r /q
  17.    C:\BIN\HPFS4DOS\ASSIGN E=E F=F
  18. :: C:\BIN\HPFS4DOS\ASSIGN
  19.  
  20. :: Remove the HPFS driver
  21. IF EXIST C:\iHPFS.       C:\BIN\HPFS4DOS\IHPFS   /u
  22. IF EXIST C:\HPFS_acc.ess C:\BIN\HPFS4DOS\WIN_ENG
  23.  
  24. :: When HPFS_access is installed at boot time, it CANNOT be uninstalled
  25. :: - That's the reason NOT to load it before any other HPFS driver
  26. MEM /C | FIND /I "HPFS" | FIND "8,048" >nul
  27. IF NOT ERRORLEVEL 1 echo ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  28. IF NOT ERRORLEVEL 1 echo █ CANNOT uninstall HPFS_access because it was loaded at boot █
  29. IF NOT ERRORLEVEL 1 echo ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  30.  
  31. :: This code looks for the following line in the MEM /c listing: 
  32. ::
  33. :: Name           Total       =   Conventional   +   Upper Memory
  34. :: --------  ----------------   ----------------   ----------------
  35. :: MSDOS       17,245   (17K)     17,245   (17K)          0    (0K)
  36. :: HPFS         8,048    (8K)      8,048    (8K)          0    (0K)
  37.  
  38. :: Reloads HPFS
  39. IF (%1)==(/a) goto _HPFS_access
  40. IF (%1)==(/A) goto _HPFS_access
  41. IF (%1)==(/i) goto _iHPFS
  42. IF (%1)==(/I) goto _iHPFS
  43. IF EXIST C:\iHPFS.       goto _iHPFS
  44. IF EXIST C:\HPFS_acc.ess goto _HPFS_access
  45. goto _iHPFS
  46.  
  47. :_HPFS_access
  48. IF EXIST C:\iHPFS.       del C:\iHPFS.
  49. ECHO Using HPFS_access>C:\HPFS_acc.ess 
  50. C:\BIN\HPFS4DOS\WIN_ENG F=1 1024b
  51. goto _swap
  52.  
  53. :_iHPFS
  54. IF EXIST C:\HPFS_acc.ess del C:\HPFS_acc.ess
  55. ECHO Using iHPFS>C:\iHPFS.
  56. C:\BIN\HPFS4DOS\IHPFS /L F:1 /C=512
  57. goto _swap
  58.  
  59. :_swap
  60. :: Swap again drive letters
  61. C:\BIN\HPFS4DOS\ASSIGN E=F F=E
  62.  
  63. :_out
  64. :: REhpfs.bat ==> End of file
  65.