[Tutor] "batch" printing
Paul Sidorsky
paulsid@shaw.ca
Mon, 22 Apr 2002 13:43:26 -0600
Kirby Urner wrote:
> If it's something you could do manually
> in DOS by sending files to lpt1, as in C:> myfile > lpt1,
> then Python could do this for you. It'll read subdirectories
> and execute your DOS commands.
Actually if they're printable from DOS, then DOS can do it for you.
Switch to the directory with the files and enter this command:
for %x in (*.*) do copy %x LPT1
Of course you can change *.* as you see fit, e.g. *.TXT.
For Windows-based files, if the program (Word or whatever) has a command
line option (say -p) to print a file directly, then this would also
work:
for %x in (*.*) do c:\msword\word.exe -p %x
Sad to say it, but it looks like using DOS commands is truly becoming a
lost art...
--
======================================================================
Paul Sidorsky Calgary, Canada
paulsid@shaw.ca http://members.shaw.ca/paulsid/