Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing to LPT1.DOS
Message
 
À
17/08/1998 17:01:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00127002
Message ID:
00127602
Vues:
32
Put them around everything:

Copy "c:\Program Files\DevStudio\Visual Foxpro\My Work\New Project\Myfile.txt" to lpt2.dos

Alternatively, try making a variable out of the file name or path and use a macro.

HTH
Barbara

>That's my problem, I can't find anything to put quotes around. :)
>
>If LPT2 is a captured printer and sys(2003) reports a folder with a short file name (ie \devstudio), COPY MYFILE.TXT TO LPT2.DOS works fine.
>
>But, if sys(2003) reports a long file name (ie \Program Files\Devstudio), the same COPY command fails with 'Invalid file name'.
>
>Strange.
>
>
>>>In FPW and VFP, you can COPY MYFILE.TXT TO LPT1.DOS to send a text file to a printer and bypass Windows print drivers. If LPT1 is a captured printer port, this works fine when the default folder is a short file name. If I try the same command, with "\Program Files" as the default folder, an error is returned "Invalid path or file name".
>>>
>>>Does anyone know a workaround for this? Named pipes (COPY MYFILE.TXT TO \\SERVER\MYPRINTER) works fine in both cases.
>>>
>>>Thanks
>>
>>Mark, have you tried putting quotation marks around the long file name? This works in other areas of VFP that have trouble with long file names.
>>
>>HTH
>>Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform