Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!ames!ucbcad!ucbvax!decvax!tektronix!uw-beaver!ssc-vax!bcsaic!michaelm From: michaelm@bcsaic.UUCP (Michael Maxwell) Newsgroups: comp.sys.ibm.pc Subject: printing > 10 files Message-ID: <88@bcsaic.UUCP> Date: Tue, 16-Dec-86 15:29:58 EST Article-I.D.: bcsaic.88 Posted: Tue Dec 16 15:29:58 1986 Date-Received: Thu, 18-Dec-86 05:41:26 EST Organization: Boeing Computer Services AI Center, Seattle Lines: 42 [the line eater eater was here] I have a friend who wants to collect lots of files in a telecommunications session, then print them later on (like overnight). The trouble is that MS-DOS, wretched excuse for an OS that it is, only allows 10 files to be in the print queue at a time. And since the print command just queues things up, you can't just run it in a loop and tell it to print one file after another. (It will go through the loop 10 times, then die.) My next thought (thinking in terms of Unix shell scripts) was that I could make some kind of a loop like the following in a batch file: for %F in * print1 %F The file print1.bat would contain something like: print %1--taking advantage of the fact that "print", w/o any arguments, just tells you what's in the queue. But there are several problems with this idea; how do you get DOS to sleep? (I'd like to not worry about programming in assembler, thanks! And putting in some kind of loop to check the output of "print" until the queue is empty sounds like a good way to keep the printer from getting anywhere fast.) And how can a batch file tell what the "print" command returns? I could redirect the output of "print" into a file, but how do you get DOS to compare the contents of two files and return the result in some kind of errorlevel (or something else that "if" can use--note that "print" returns errorlevel 0 regardless of whether there's anything in the print queue)? Maybe something along the following lines would work: for %F in * print2 %F --where print2.bat contains: again: print %1 if errorlevel 1 goto again Again, this seems wasteful of machine cycles... (I may not have the syntax right, I don't have a PC here.) I'm sure someone's done this before, and probably with error checking (printer out of paper, etc.). Pointers? Tested methods? -- Mike Maxwell Boeing Advanced Technology Center arpa: michaelm@boeing.com uucp: uw-beaver!uw-june!bcsaic!michaelm