View Full Version : Batch files

15-02-2002, 11:34 PM
Interested to read Lincoln Spector's batch file to print a folder list - it uses a few batch commands that this old DOS-head doesn't know.
Two questions:
1. Where can I find a complete list of batch commands for Win95/98 ?
2. Is it possible to write a batch file to open [say] a MS Works document, consisting of a letter-head including a graphic, add to it the contents of another textfile [say a standard letter, or an invoice], print it, then 'reset' itself ?
I want the flexibility to include loops and 'if' statements which a
batch file provides - macros don't do this [I think].

16-02-2002, 02:04 AM
www.google.com is very handy, You put in [batch +file +tutorials] and guess what, you can also do [jokes +computer]

16-02-2002, 10:28 AM
For a complete list of DOS commands go here:-

I hope this helps.

16-02-2002, 01:02 PM
You can concatenate files in they way you want, but not Word files. A Word file is input to the Word programme, which can use the formatting information in it to print it. A printer will produce a mess from it.

You could make a letterhead in Word, and 'print' it to a file, and make text files for the letters (but they would not be printed as Word files),
then: 'copy word.out+text.txt LPT1:'.

But I don't think that this is the result you want.

You can find books about DOS in Public Libraries. Most commands have been carried over to DOS 7 and whatever.

Most commands respond with help when issued with the option ' /?' .

16-02-2002, 04:48 PM
You can use IF statements and loops if you use the Visual basic editor to modify the macros. You can get to this in Word by going to Tools, Macros, Visual basic editor.

I do not think that it is possible to do what you are asking using a batch file as this can only perform DOS commands.

17-02-2002, 03:35 PM
Many thanks for your comments, folks - I'll certainly try the
websites you suggest; though I have to admit, after I made the posting, I did find some of the DOS info. I wanted in the nether regions of my Win98 disc - which just goes to show the good that comes of RTFM !

Re the printing thing, I suppose what I need is something to combine the graphic letterhead printer encoded file with the 'line printer' text file, without the printer putting in a page break between them [which would give me the header and the script on SEPARATE pages].
Anyone any thoughts ?

Thanks again.