home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
i
/
incmd20.zip
/
INCOMAND.EXE
/
SORTDIR.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-08-15
|
610b
|
24 lines
echo Sample batch file for InCommand
rem This is an example of using InCommand utilities in a batch file.
IF NOT %1!==! goto OK
echo Usage: SORTDIR dirname [/BYTIME] [/BYSIZE] [/BYEXTENSION]
goto END
:OK
rem Create a subdirectory to temporarily hold the files
MOVE %1\*.* %1\~TEMP~.~\ /CREATE
IF ERRORLEVEL 3 goto ERROR
rem Now move the files back, sorting as specified. /BYNAME is the default.
MOVE %1\~TEMP~.~\*.* %1 %2
IF ERRORLEVEL 3 goto ERROR
ird/nolist %1\~TEMP~.~
echo %1 sorted.
goto END
:ERROR
echo SORTDIR failed. You may have to retrieve files from %1\~TEMP~.~\
:END