Dec 052017
Batch file utilities.
File BATTOOLS.ZIP from The Programmer’s Corner in
Category Batch Files
Batch file utilities.
File Name File Size Zip Size Zip Type
BATCD.COM 256 73 deflated
BATCD.DOC 1920 744 deflated
BATQUES.COM 256 43 deflated
BATQUES.DOC 2432 1014 deflated
CONFIRM.COM 128 110 deflated
CONFIRM.DOC 768 387 deflated
PAUSE2.COM 384 89 deflated
PAUSE2.DOC 1408 773 deflated
RESPONSE.COM 1152 280 deflated
RESPONSE.DOC 1152 480 deflated
WAITUNTL.COM 512 290 deflated
WAITUNTL.DOC 273 199 deflated

Download File BATTOOLS.ZIP Here

Contents of the BATCD.DOC file


This program allows a batch file to change directories (just
like the CD command), but to read the new directory from the
"standard input file" instead of the command line.

The command:

BATCD reads new directory from keyboard
BATCD < file reads new directory from "file"
BATCD < file > nul no display of new dir name when changing

You can use the directory changer to change back to the directory a
batch file started out with, such as when doing a spelling correction
or fancy font printing.
. (your batch file to do fancy font from any directory)
echo off
cd > \bin\bat\starting.dir saves initial directory
copy %1 \fancyfnt\temp/v make file local to pfont dir
cd \fancyfnt go to pfont dir
pfont +fi temp +fo romn12 (etc.) do printing
del temp get rid of local file copy
batcd <\bin\bat\starting.dir >nul return to user's directory
echo on

If you were going to, for example, a speller directory, which made
changes to the file, then you would copy the local file back before
changing directories back:

echo off
cd >\bin\bat\starting.dir save initial directory
copy %1 \speller\temp.txt/v make your file local
cd \speller
spellit temp.txt
batcd <\bin\bat\starting.dir >nul change back to user's dir
copy \speller\temp.txt %1/v copy spelling corrected file
del \speller\temp.txt back & delete other copy
echo on

Note that the new input is read as a single line, without any prompt,
followed by a carriage return. If the input is not a valid directory,
then the message "path not found" is placed on the standard output
file (console, but redirectable if one wishes).
then the message

 December 5, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>