(*==================================================================== = Peter M. Perchansky = = 211 South 5th Street = = Womelsdorf, PA 19607 = ====================================================================*) Have you ever wanted to be able to test for the existance of a given directory from within a batch file? Now you can with the help of EXISTDIR.EXE. Usage: EXISTDIR Examples: EXISTDIR F:\APPLICATIONS\PROCOMM EXISTDIR C:\UTILITY If the directory does not exist, EXISTDIR will set the DOS error level to 1; otherwise it will be set to 0 (the directory exists). SAMPLE.BAT @ECHO OFF EXISTDIR C:\QUICKEN IF ERRORLEVEL 1 GOTO NODIR CD\QUICKEN Q GOTO END :NODIR ECHO C:\QUICKEN DOES NOT EXIST GOTO END :END EXIT ANOTHER.BAT @ECHO OFF @REM %USER% CONTAINS USER'S LOGIN ID EXISTDIR F:\APP\PROCOMM\%USER% @REM IF DIRECTORY DOES NOT EXIST, THEN CREATE IT. IF ERRORLEVEL 1 MD F:\APP\PROCOMM\%USER% CD F:\APP\PROCOMM\%USER% SET PCOMNET=F:\APP\PROCOMM PCOMNET /FNCR9500U.ASP SET PCOMNET= CD F:\%USER% EXIT Also included in this archive is a utility called LISTDIRS.EXE. LISTDIRS will display the subdirectories within the current directory or a directory of your choice. Usage: LISTDIRS or LISTDIRS F:\APP\PROCOMM Both programs are free, and include the source code for the main modules. Feel free to write me at the above address or drop me a message on Interlink (C, Pascal, or Language Conference), FidoNet (Node 1:273/101), or the Journal of Pascal, Ada, and Modula-2 BBS (/Modula-2 or /M2TECH sections).