home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / e52os2m.exe / nfdeldir.cmd < prev    next >
OS/2 REXX Batch file  |  1998-05-27  |  640b  |  38 lines

  1. @echo off
  2. REM nfdeldir d: \netfin c: 
  3. REM nfdeldir <netfin drive> <netfin dir> <boot drive>
  4. IF "%1" == "" GOTO ERROR_ARG
  5. IF "%2" == "" GOTO ERROR_ARG
  6. IF "%3" == "" GOTO ERROR_ARG
  7.  
  8. %3\nfunicfg.exe
  9. del %3\nfunicfg.exe
  10.  
  11. REM Change to NetFinity directory
  12. %1
  13. IF ERRORLEVEL 1 GOTO ERROR_ARG
  14. IF NOT EXIST %2 GOTO ERROR_ARG
  15. cd %2
  16. IF ERRORLEVEL 1 GOTO ERROR_ARG
  17.  
  18. IF EXIST * del /N *
  19. cd ..
  20. rd %2
  21. IF ERRORLEVEL 1 GOTO ERROR_NF
  22. del %3\nfdeldir.cmd
  23. GOTO END
  24.  
  25. :ERROR_ARG
  26. echo Invalid arguments to command file
  27. cd \
  28. GOTO VERY_END
  29.  
  30. :ERROR_NF
  31. echo Invalid NetFinity directory structure
  32. GOTO END
  33.  
  34. :END
  35. %1
  36. cd \
  37.  
  38. :VERY_END