home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
utility
/
dirx.zip
/
DIRXDEMO.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-09-17
|
3KB
|
92 lines
@echo off
if %1a == a goto :HELP
cls
echo Welcome to the show! prepare to be amazed!
echo The first contest will be DIRX vs DIR
echo (watch this)
pause
echo on
dir %1:\
@echo off
echo Want to see a list of DIR files only? easy! (dir %1:\*.)
pause
echo on
dir %1:\*.
@echo off
echo .
echo .
echo Now how about everything but the DIR files? DOS doesn't know how to do that!
echo But DIRX does! (dirx {%1:\ -D)
pause
echo on
dirx {%1:\ -D
@echo off
echo .
echo .
echo Note that dirx gives the same display, but includes another column - these are
echo the file attributes. A(rchive) R(ead-only) H(idden) S(ystem) D(irectory)
pause
echo How about all non DIR files, except the system files? (dirx {%1:\ -d -s)
pause
echo on
dirx {%1:\ -d -s
@echo off
echo .
echo .
echo Now let's take away command.com, autoexec.bat, and config.sys from the list.
echo (dirx -d -s -command.com -autoexec.bat -config.sys {%1:\)
pause
echo on
dirx -d -s -command.com -autoexec.bat -config.sys {%1:\
@echo off
echo .
echo .
echo How about all of the system files that begin with "IO" (dirx {%1:\ +s io*.*)
pause
echo on
dirx {%1:\ +s io*.*
@echo off
echo .
echo .
echo How about all of the executable, command, and batch files?
echo (dirx *.exe {%1:\ *.com *.bat)
pause
echo on
dirx *.exe {%1:\ *.com *.bat
@echo off
echo .
echo .
pause
echo I won't demonstrate this one, but DELX uses exactly the same conventions as the
echo above examples to delete selected files. This means that after you use DIRX
echo to see what files are in the list you specified, you could type "DEL" and then
echo press F3 to copy the rest of the previous command line onto the cursor line.
echo That process will delete ALL of the files and/or directories specified. Note
echo that Hidden (+H) and Read-only (+R) files and Directories (+D) will be deleted
echo automatically if the attributes are specified as included (+). If you don't
echo specify the attribute, you will be prompted before these types of files are
echo deleted. When directories are deleted, all sub-directories contained in them
echo are deleted and removed, then the directory itself is removed.
pause
cls
echo COPX also uses the same parameters, but also allows target parameters (up to 30)
echo Each one must be preceded by a "}". Multiple sources may be indicated (for DIRX
echo DELX and COPX) by preceding them with a "{". COPX allows you to copy a list of
echo files to one or more disks on each target. For example, if you specify }A: in
echo the parameter list and drive A: does not have enough free diskspace to hold all
echo of the files, COPX will pause and ask you if you want to continue on another
echo disk, and on which drive.
pause
echo The /p and /w parameters affect DIRX the same way as they do DIR.
echo Using /p with DELX causes it to pause before deleting each file. When the file
echo name is displayed on the screen the user can either press any key to delete it
echo or CTRL-C to stop the program.
echo The /n switch applies to COPX only and refers to "No prompting". This means
echo that the user will not be asked before a new directory is created.
goto :END
:HELP
@echo off
echo USE: dirxdemo c
echo where c is the letter of your boot disk
:END