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 >
Wrap
DOS Batch File
|
1994-04-20
|
1KB
|
55 lines
@ECHO OFF
if "%1"=="/?" goto usage
if "%1"=="/E" goto rights1
if "%1"=="/e" goto rights1
if "%1"=="/A" goto all1
if "%1"=="/a" goto all1
if "%2"=="/R" goto rights2
if "%2"=="/r" goto rights2
if "%2"=="/E" goto rights2
if "%2"=="/e" goto rights2
if "%2"=="/D" goto date
if "%2"=="/d" goto date
if "%2"=="/S" goto subdir
if "%2"=="/s" goto subdir
if "%2"=="/A" goto all2
if "%2"=="/a" goto all2
ndir %1 /DO
if %errorlevel==1 goto usage
goto end
:rights1
ndir /R /DO
if %errorlevel==1 goto usage
goto end
:all1
ndir /R /DA /S /DO
if %errorlevel==1 goto usage
goto end
:rights2
ndir %1 /R /DO
if %errorlevel==1 goto usage
goto end
:date
ndir %1 /DA /DO
if %errorlevel==1 goto usage
goto end
:subdir
ndir %1 /S /DO
if %errorlevel==1 goto usage
goto end
:all2
ndir %1 /R /DA /S /DO
if %errorlevel==1 goto usage
goto end
:usage
echo LISTDIR.BAT
echo Usage: LISTDIR [path [option]]
echo options /R Rights
echo /E Effective rights
echo /D Date/time
echo /S Subdirectory
echo /A All
echo or use NDIR [path] /DO
:end