INSTRUCTIONS FOR USING CMDBLD.EXE PURPOSE This program concatenates a list of file or directory names contained in an ASCII text file to a call to a batch file of commands. The resultant batch output file will execute the command set in the called batch file against each file or directory in the input list. Each entry in the output file is of the form: @CALL , where: is the name of the batch file containing the commands to be executed is the currently processed directory or filename from the list of directory or file names. PROGRAM The executable program set consists of two files: CMDBLD.EXE and CMDBLD.OBJ. These two files must remain in the same directory, but their root names can be changed to any valid DOS rootname so long as both files are renamed. REQUIREMENTS DOS 4.01 or later is required to run the output batch file due to its use of the CALL command. USE The program can be executed from the command line or from within a batch file by typing CMDBLD. (Be sure to include the path to this file if it is not in your current directory or on your PATH). The program will then ask you for: 1) The name of the ASCII text file containing the list of file or directory names to be processed. Be sure to include the path to this file. Its existence will be verified by the program. 2) The name of the batch command file containing the command(s) to be executed against each file or directory in the above list. 3) The filename you wish to assign to the output file created by this program. This batch output file will contain a series of @CALL commands as described above. INPUT FILES In addition to the CMDBLD.EXE and CMDBLD.OBJ files, two additional files are needed. These are: 1) The ASCII text file list of files or directory names to be processed. I have found that using DOS 5.0's enhanced dir command with its various switches and redirecting the output to an ASCII text file is the easiest way to create this file. For instance, in order to create an alphabetical listing of sub-directories off of the current directory and save them as an ASCII text file named 'FILELIST.TXT', enter the command: DIR /B/ON/AD > FILELIST.TXT 2) The batch file of commands to be executed against the files or directories in the above list. The replaceable parameter %1 should be inserted in the command strings wherever a file or directory name is to be substituted. For instance, the batch command to delete all the "BAK" files in the sub-directories contained in the above list would be: DEL %1\*.* The batch file of commands can be created as you would any batch file. OUTPUT FILE The user-named output file is a simple batch file that can be executed stand-alone or from within another batch file. SOURCE CODE The executable files were compiled in QuickBasic 4.5. The source code in ASCII format is included as CMDBLD.BAS. NOTICE This program is freeware and can be distributed freely. The author makes no warranties, implied or otherwise, as to the contents or capabilities of this program, or as to its fitness for use. Many thanks to Mark Beyder for his ideas and suggestions regarding this program. Please contact Don Kulle on CompuServe @ 70410,1516 should you have any questions, comments, or suggestions.