Guest
Public paste!

Midna

By: a guest | Jun 23rd, 2008 | Syntax: DOS | Size: 0.83 KB | Hits: 417 | Expires: Never
Copy text to clipboard
  1. REM Recovery program for NetHack.
  2. REM Please note this is incomplete as of yet.
  3. REM Also, "REM" is akin to "//" as a comment line. I'm not sure that "//" works with DOS.
  4.  
  5. @echo off
  6. cls
  7. echo Setting parameters...
  8.  
  9. :settvars
  10. set recfile=
  11. set prorecfile=
  12. set recconfirm=
  13. set /P recfile=Please enter the name of the character to be recovered:
  14.  
  15. :recovchk
  16. echo Searching for file(s) with given name....
  17. if EXIST user-%recfile%.0 (
  18. set prorecfile=user-%recfile%.0
  19. set /P recconfirm=Recover file %prorecfile%? [yn]
  20. if recconfirm==y (goto recovery)
  21. if recconfirm==Y (goto recovery)
  22.  
  23. :canclrec
  24. echo You have cancelled the recovery process. The program will now close.
  25.  
  26. :recovery
  27. echo Recovering %prorecfile%....
  28. recover %prorecfile%
  29.  
  30. :errorchk
  31.  
  32. :exitprog
  33. echo Program closing.