Hi Robin,
A lot of reason can be. first of try call foxpro with a batch file and put your mode command settings before called foxpro in your batch file.,
if it cannot help you or you using windows xp try copy command instead of ">com1". sample:
!copy myfile.txt com1 (don't use foxpro's copy file it cannot help you)
another way (I'm using it than), I got it in another guy in UT (thanks him):
SET PRINTER TO myprinter.txt
SET PRINTER on
SET CONSOLE OFF
?"nfdgkfdjkgfk"
?"ncvmxvkcxvkc"
?"kvdjlgjkfsl"
SET PRINTER TO
SET CONSOLE ON
SET PRINTER off
xfile="myprinter.txt"
xport="com1"
STRTOFILE(CPCONVERT(CPCURRENT(1) ,CPCURRENT(2),FILETOSTR(m.xfile)),m.xfile)
DECLARE INTEGER CopyFile IN kernel32;
STRING lpSrcFile, STRING lpDstFile, INTEGER bFail
CopyFile(m.xfile,m.xport, 0)
>Hi!
>
>Got my hands on a till draw that opens when anything is sent to COM1
>
>So
>
>ECHO OPEN THE TILL DRAW >COM1
>
>from a DOS windows works.
>
>but running a batch file from FPD26 gives me a write error?
>
>or setting print to COM1 doesn't seem to work?
>
>Can anyone help?