Click here to Skip to main content
14,607,924 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am looking for a way to copy the file "test.txt" to my usb printer which connected via USB002 port. this file contains some code instructions which design my print page. The reference of the printer tells me to copy the txt file to the printer using the DOS command line. But I really do not have the experience or whatsoever to do that.

Is there anyone who can explain how I copy the file? I guess I need something like:

copy test.txt /A/D USB002/A

Thanks in advance
Updated 20-Apr-18 4:25am
Rate this:
Please Sign up or sign in to vote.

Solution 2

I thought that USB002 is your printer port. Sorry for the confusion. First you need to map your printer to any of avilable printer port. To do that follow the step as given below

1. Open the Printer Property Page.
2. Go to the share / sharing tab. Check the Share button and give the one printer share name, and click on ok.
3. Open the Command Prompt CMD
4. Excute the given command
5. net use lpt1: \\computername\printersharename /persistent:yes

Here you are actually directly the lpt1 printer port to your USB print.
/persistent:yes means to map every time you login so no need to run this command every time.

After doing so you can easily run the dos command.
COPY /B test.txt LPT1
Member 11409258 28-Jan-15 11:06am
thanks for the information. but my problem is... printer prints only 1st line.
please help.
Rate this:
Please Sign up or sign in to vote.

Solution 1

This command should work for it.
COPY /B test.txt USB002
pieterjann 26-Sep-12 2:53am
This places a file named usb002 on my desktop (test.txt is on my desktop too).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100