home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / n4bats.exe / LISTDIR.BAT < prev    next >
DOS Batch File  |  1994-04-20  |  1KB  |  55 lines

  1. @ECHO OFF
  2. if "%1"=="/?" goto usage
  3. if "%1"=="/E" goto rights1
  4. if "%1"=="/e" goto rights1
  5. if "%1"=="/A" goto all1
  6. if "%1"=="/a" goto all1
  7. if "%2"=="/R" goto rights2
  8. if "%2"=="/r" goto rights2
  9. if "%2"=="/E" goto rights2
  10. if "%2"=="/e" goto rights2
  11. if "%2"=="/D" goto date
  12. if "%2"=="/d" goto date
  13. if "%2"=="/S" goto subdir
  14. if "%2"=="/s" goto subdir
  15. if "%2"=="/A" goto all2
  16. if "%2"=="/a" goto all2
  17. ndir %1 /DO
  18. if %errorlevel==1 goto usage
  19. goto end
  20. :rights1
  21. ndir /R /DO
  22. if %errorlevel==1 goto usage
  23. goto end
  24. :all1
  25. ndir /R /DA /S /DO
  26. if %errorlevel==1 goto usage
  27. goto end
  28. :rights2
  29. ndir %1 /R /DO
  30. if %errorlevel==1 goto usage
  31. goto end
  32. :date
  33. ndir %1 /DA /DO
  34. if %errorlevel==1 goto usage
  35. goto end
  36. :subdir
  37. ndir %1 /S /DO
  38. if %errorlevel==1 goto usage
  39. goto end
  40. :all2
  41. ndir %1 /R /DA /S /DO
  42. if %errorlevel==1 goto usage
  43. goto end
  44. :usage
  45. echo LISTDIR.BAT
  46. echo    Usage: LISTDIR [path [option]]
  47. echo           options  /R  Rights
  48. echo                    /E  Effective rights
  49. echo                    /D  Date/time
  50. echo                    /S  Subdirectory
  51. echo                    /A  All
  52. echo    or use NDIR [path] /DO
  53. :end
  54.  
  55.