Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print to a file from DOS in Windows 98??

Status
Not open for further replies.

Rohdem

Programmer
Sep 20, 2000
553
US
I need to print out of dos to a file on a Windows 98 machine. I can create a file printer, but Windows 98 will not allow me to share it, so I cannot capture the port in DOS. The DOS program is on a network drive and runs on the server. Does anyone know of a workaround for this?

Thanks Mike Rohde
"I don't have a god complex, god has a me complex!"
 
Not certain I understand the problem, can you be a bit more explicit?
 
Write it to the server and pull it across from the WS.
I'm assuming that the DOS program can't understand networking so can only write to resident drives.
Ed Fair
efair@atlnet.com

Any advice I give is my best judgement based on my interpretation of the facts you supply.

Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.

 
Sorry for not being clear enough.

The DOS program trys to print the report to lpt3. lpt3 is captured to a network printer via the 'net use' command. If I were trying to do this on an NT machine, I could use the command:

net use lpt3 \\NTworkstationname\sharedprinttofileprinter,
Then I could print the report and it would prompt me for where I want to save the file.

Windows 98 will not allow me to share a printer whose port is set to 'file'. Therefore, I can't use 'net use' to capture lpt3 to that printer.

I know that I could just print to one of our NT workstations, but I would like the user to be able to do this all on their Windows 98 machine.

Hope this is not more confusing :) Mike Rohde
"I don't have a god complex, god has a me complex!"
 
I'm sorry I don't fully understand your question. Are you trying to print from a dos program, or from the command line? If you are doing it from a command line, you can always redirect the output to a .txt file and then print from within windows.

Example:
dir *.* >dir.txt -- this will generate a file called dir.txt and the data would be all files in the location of the "dir" was entered.

then print dir.txt file
 
I am printing out of a DOS based accounting program. The program is set to automatically print to LPT3. Normally, what we do on NT is create a local printer on the machine that captures the output to a text file. We then share the printer and use 'net use' to capture lpt3 to that printer. Then when the DOS program, prints the report it goes to the printer that is set up to capture the output. The problem is, with Windows 98, you cannot share the printer if it is set up to capture the output to a file. Mike Rohde
"I don't have a god complex, god has a me complex!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top