473,396 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

copy text file to com printer

MindBender77
234 100+
Hello All,
I've been fussing with this for the last few days. I'm attempting to copy a text file to a zebra printer that is wired to com 12. I've been using Window's command prompt to test this, however, when I sent the file to the com port nothing happens. Am i missing something? Here is the simple command I'm using.

C:> copy test.txt com12

Any suggestions will help at this point.

Bender
Dec 10 '08 #1
3 13757
AmberJain
884 Expert 512MB
Hello,

You should instead type something like:
Expand|Select|Wrap|Line Numbers
  1. C:> copy test.txt > com0
In your code, you missed redirection operator '>'. You might be amazed why I redirected the contents of test.txt to com0 and so read on.

Are you sure that your printer is connected to com12? IMO, there are only 10 com ports (ranging from com0 to com9) to which data can actually be redirected in windows OSes. I don't think you can redirect data to com12 because windows thinks that you are redirecting to a file named com12 and not device 'com12'. You should either connect your printer to a com port between com0 to com9 or you should try some different approach. But then, I may be wrong too as I am not sure.

Hope this helps...
AmbrNewlearner
Dec 11 '08 #2
MindBender77
234 100+
@ambrnewlearner
Agreed, however, this particular machine uses a digi-board increasing the number of coms. Also, we have an INI file stating which com the printer is using. I'll give your suggest a go and post back the results.

Thank you for your help,
Bender
Dec 11 '08 #3
MindBender77
234 100+
I finally got this problem solved. Here is the code so it may assist others.

Expand|Select|Wrap|Line Numbers
  1. C:>copy file.ext \\.\com12 /b
  2.  
Regards,
Bender
Dec 11 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jay | last post by:
This is a strange one that I can't seem to find a fix for. We have a Billing DB application (Access 2000 format) where we upload billing info in a comma delimited text file to our printer who...
2
by: Benny | last post by:
Hello Experts, Currently I working on a web application using vs.net with C#. I require to create an invoice to a text file and print the file. I have no problem with writing to the text, but...
2
by: David Cuffee | last post by:
I am not having any luck printing a simple text file with PCL codes to my windows printer. If I have a text file with PCL codes and I want to dump that file to my default windows printer, how would...
8
by: david | last post by:
I have made a test: copy a text file to clinet side. But fails. What I did is that create a web method in web services that read a text in server side and return the text file as string. On the...
2
by: Hardik Shah | last post by:
Hi, I am generating a text file through vb.net and I want to give facility to my user to take DOS base (fast) printiout of it , or in other words, I want to run DOS command from my...
6
by: ivan.perak | last post by:
Hello, im a beginner in VB.NET... The thing i would like to do is as it follows.... I have a text file (list of names, every name to the next line) which is about 350000 lines long. I would...
2
by: Cliff72 | last post by:
Is there a way in VBA to copy a file from a web server to a local drive? Example: Every morning at 3AM a huge mainframe report is run and a copy of this report is saved as a text file on a web...
2
by: Chronos | last post by:
Hi all, Is it possible to print text file to a remote printer in C#? If so, can you tell me how? Thanks, Chronos
5
by: dm3281 | last post by:
Hello, I have a text report from a mainframe that I need to parse. The report has about a 2580 byte header that contains binary information (garbage for the most part); although there are a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.