>Well.. I'm still stumped. I do have LPT1 captured on those win95 machines. As a matter of fact I have yet to find a Win95 PC that will do it. If anybody else knows the secret syntax please let me know.
>
See my FAQ entry on copying a file to a printer port here on UT; it shows a mechanism to copy to a port or UNC-based network device unambiguously using an API call, CopyFile(); it works consistently and identically on all Win32 platforms.
>Thanks for the help Al.. So far you have saved me a ton of time. This is one great place to get valuable information.
>
>
>
>>The ... TO LPTx.DOS setting depends on which DOS printer port is "captured" on each particular machine. Make sure that "MS-DOS" print jobs can be sent to the printer you choose, from the W95 PC.
>>
>>You could also try just LPTx on the W95 machine.
>>
>>>Thanks!
>>>The below works Great. Except:
>>>COPY FILE Outputfile TO LPT1.DOS
>>>I get "Can not create File" when usign a WIN95 Machine.
>>>using NT4.0 Works great. Any other Ideas.
>>>
>>>>The cause of your problems is indeed Windows' control of the printer.
>>>>
>>>>Generally, your best bet is to create a single file which you then dump to the appropriate printer. First, create a file containing your printer initialization codes. I haven't tested this, but you can probably SET ALTERNATE TO a file, then run your ??? commands, to place them in that file.
>>>>
>>>>****************************************
>>>>SET ALTERNATE TO InitFile
>>>>??? your printer init commands
>>>>???
>>>>???
>>>>SET ALTERNATE TO &&closes the InitFile
>>>>* If your Init commands are always the same, you could manually
>>>>* create the Initfile and not bother with the above.
>>>>
>>>>*You then need to combine this init file with your text file. A single DOS *command can do this, so you could RUN it from within VFP e.g.
>>>>RUN COPY InitFile+TextFile OutputFile
>>>>
>>>>*You then issue a native VFP COPY command to dump the result to the printer:
>>>>COPY FILE OutputFile TO LPTx.DOS
>>>>****************************************
>>>>
>>>>Since you've been printing using FPD, you probably already have DOS printer ports captured appropriately, so the above should work.
>>>>
>>>>>Hope someone can help with this. I have some txt files that get loaded onto my network from a main frame. These files are ment to be printed on 11x17 paper. In the past using 2.6 Dos I have used PCl Commands to set the printer up before issuing the Type myfile.txt to printer. The time finally came to port this App over to VFP6.0... well to make a long story end. Why does the following not work in VFP 6/5:
>>>>>
>>>>> ???
>>>>> ???
>>>>>ETC.
>>>>>
>>>>>I assume its because windows wants to control the printer.. Is there a way around it?
>>>>>
>>>>>As Always
>>>>>Thanks in advance and
>>>>>Thanks for everyone that has helped in the past.
>>>>>
>>>>>Bob Buske