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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot create file using copy file command

Status
Not open for further replies.

dougerstew

Programmer
May 30, 2003
54
US
i've seen other instances where people have gotten the cannot create file error, but none i found were similar to mine. I apologize if i've missed it.

i use the command COPY FILE "U:\labelvfp\test.txt" TO \\fserver\t6215-new to print to a dot matrix printer. it works fine from my laptop. But on other workstations it gives the message "cannot create file t6215-new". Can anyone tell me why this is happening and how to fix?

thanks
doug
 
actually i just noticed I used

Set printer to \\fserver\t6215-new (didn't put "name" in the command). does that matter?
 
Okay, i stopped the blank pages from printing, and added NAME to SET PRINTER TO. It looks like this made a big difference. now the only issue i seem to have is being able to print more than 500 labels at a time (125 sets of 4 labels across). I get the error "invalid coordinates".
 
Invalid coordinates" is documented as meaning "Coordinate values must be greater than -32768 and less than 32767."

What are you doing outside of that range? Only you know.

I'm actually hesitant to dive in to this discussion again because you still haven't answered the questions I asked earlier. But this is sounding more and more like something we used to see in FPW, which reported "Position is off screen" when Foxfont was not installed on the runtime workstation.
 
>The exe file being used resides on the server along with all the vfp resource files.
Just a note on that: This still doesn't mean every client is running the EXE on the server side.

If you put an EXE in a network share and start it on a client, it runs on the client. It sees the clients printers and settings, so things like a missing foxfont as dan points out last can make a difference. Fonts always are locally installed and other environmental things are always local, no matter if you copy an EXE to local before executing it or not. Therefore a concept of server side placed EXEs still should have a minimum local installation of what's needed. I'd add the runtimes as local installation, too. That way you can execute many VFP apps you don't need to setup locally after that base installation.
But even then a local copy of any EXE pays alone for the fact any client still executing the server side stored EXE will hinder you to replace it with an update version.

Bye, Olaf.
 
i stopped the blank pages from printing, and added NAME to SET PRINTER TO. It looks like this made a big difference.

Of course it did. If you read the Help on SET PRINTER, you would see there are several forms of the command, including:

[tt]SET PRINTER TO [FileName [ADDITIVE] ][/tt]
FileName specifies a file name to which output is directed.

[tt]SET PRINTER TO NAME \\ServerName\PrinterName[/tt]
Spools printer output to a network printer

In the first case, it was interpreting your printer name as the name of an output file. It was the second case that you wanted.

It's always worth reading the Help, especially when you are unfamiliar with the commands and their clauses.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I got it to work w/o the invalid coordinates problem using the SET alternate commands and ???. The only minor issue now is it sometimes ejects a 2nd set of blank labels between jobs. But compared to having a limit to the number of labels and the legibility issue, this is nothing. Thanks everyone for all their input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top