Command Line: Capturing USB Printer
Results 1 to 5 of 5

Thread: Command Line: Capturing USB Printer

  1. #1
    Junior Member
    Join Date
    Nov 2003
    Posts
    5

    Question Command Line: Capturing USB Printer

    Hey I am runninng Windows XP Professional and I was wondering if it possible to capture the printer through a USB port on Command Line. Like for instance I am trying to print a directory of a disk in my A drive. But I have do it through command line for a class I am taking.

    Any help would be appreciated.

  2. #2
    Just a Virtualized Geek MrLinus's Avatar
    Join Date
    Sep 2001
    Location
    Redondo Beach, CA
    Posts
    7,324
    Goodbye, Mittens (1992-2008). My pillow will be cold without your purring beside my head
    Extra! Extra! Get your FREE copy of Insight Newsletter||MsMittens' HomePage

  3. #3
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    If you have the printer already hooked up this should work. first go to a directory where you can save a file and type this:
    dir A:\directory\you\want\to\print > dir.txt
    that saves the output of the dir command to a text file. now do this:
    print /D:\\192.168.1.1\printer c:\saved\directory\dir.txt
    where the 192.168.1.1 is your current ip and printer is the name of the shared printer. c:\saved\directory is the directory you were in when you did the first command. For a local printer, go to printers and faxes and see what the name of the printer is and you should just be able to do this:
    print /D:nameofprinter c:\saved\directory\dir.txt
    and it will print. Hope this helps.

    edit
    I tried it on a local printer and it didn't work, but you should be using a shared printer if you are at school. Maybe I just did it wrong, you should probably give it a try anyway.

  4. #4
    Just a Virtualized Geek MrLinus's Avatar
    Join Date
    Sep 2001
    Location
    Redondo Beach, CA
    Posts
    7,324
    Actually, h3r3tic, you're on the right track (didn't even think about this). Rather than printing from command line (which I believe you can't do with a USB printer) you redirect the output to a text file (e.g., dir a:\directory > c:\directory.listing.txt) and then using notepad, wordpad or some other text editor, print the file like normal.
    Goodbye, Mittens (1992-2008). My pillow will be cold without your purring beside my head
    Extra! Extra! Get your FREE copy of Insight Newsletter||MsMittens' HomePage

  5. #5
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    If you have to do it all from DOS, try this. Do the dir a:\ > dir.txt to make your text file. And if the printer is shared know the ip of the shared printer and do this.
    print /D:\\ip\sharename c:\dir\dir.txt
    this I already posted but here is something I wanted to add, if the printer is shared but attached to your computer do this
    print /D:\\127.0.0.1\printername c:\dir\dir.txt
    and if it is not shared, a lot of the time it will ask you during the install of the printer if you want to associate the printer with the lpt1 port for printing from dos. If this was done you can do this to print from dos:
    print /D:lpt1 c:\dir\dir.txt
    also try using lpt0, lpt2, lpt3 and just lpt
    hope this helped.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •