Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Commands DOS
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
Posted 25-Sep-12 4:45am
Edited 25-Sep-12 4:46am
v2
Rate this: bad
good
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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This command should work for it.
COPY /B test.txt USB002
  Permalink  
Comments
pieterjann at 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)

  Print Answers RSS
0 Nirav Prabtani 318
1 OriginalGriff 227
2 Sergey Alexandrovich Kryukov 216
3 Mika Wendelius 185
4 CPallini 170
0 Nirav Prabtani 284
1 OriginalGriff 217
2 Sergey Alexandrovich Kryukov 196
3 Mika Wendelius 185
4 CPallini 170


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 26 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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