Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
DOS/Other
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory monitor motherboard network operating system printer problem ram registry router slow software sound svchost.exe toshiba trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > DOS/Other >
print with dos command

Reply  
Thread Tools
lemings's Avatar
Member with 30 posts.
 
Join Date: Jul 2009
Experience: Intermediate
19-Aug-2009, 05:35 AM #1
Unhappy print with dos command
hi there,

i'd like to know if there is a dos command to send an order to a specific
printer for printing all documents at a specific folder

thanks
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
19-Aug-2009, 06:25 PM #2
If you have a printer hooked up to an LPT port.
TYPE FILE.TXT > LPT1
COPY /B *.TXT LPT1

There is another program that may do what you want. It is called PrintFile. You can set it up to watch a directory and when a document is dropped into it, it will print the file.

What kind of documents are you wanting to print.
lemings's Avatar
Member with 30 posts.
 
Join Date: Jul 2009
Experience: Intermediate
22-Aug-2009, 07:59 AM #3
dos printing
i'd like to print all pdf documents in a folder, i've tested the print command, but it print in a paper (ur document is being succesufuly printed) but it doesnt print the content of the document, also the printer
is a network printer,

if u have any suggestions,

with pleasure
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
23-Aug-2009, 12:59 AM #4
This should work for you.
http://www.print-conductor.com/
lemings's Avatar
Member with 30 posts.
 
Join Date: Jul 2009
Experience: Intermediate
24-Aug-2009, 04:38 AM #5
print command
the print conductor will print the documents at a specific folder, but
i'd like to do this automatically with a bat file, i dont want to open the
programm and lanch the printer, im wondering if it can be done by a
command

thank u for helping
lemings's Avatar
Member with 30 posts.
 
Join Date: Jul 2009
Experience: Intermediate
24-Aug-2009, 05:07 AM #6
dos command
i've got to explain :
first problem i've encountered, is how to move pdf files from folders and subfolders, i've find this and it works :

For /F "tokens=*" %%A in ('dir /b /s "C:\test\*.txt"') do (
move /y "%%A" C:\test2
)

secondly, i'd like to print all the documents moved so i've tried this :

net use lpt1: \\srv-casablanca\imprimante
print c:\test2\*.pdf

but it prints me the papers with one line each :
?????????????????????????????????????????????????
this is the line, id like to see the contents not ???

can u help

thanks
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
24-Aug-2009, 04:43 PM #7
Print only prints text files. You will need a Vbscript to invoke the correct program to print the file. There was a thread about this a couple of years back, I just can't recall which one.
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
24-Aug-2009, 05:14 PM #8
Should have known Rob would have a script for this.
http://www.robvanderwoude.com/printfiles.php
lemings's Avatar
Member with 30 posts.
 
Join Date: Jul 2009
Experience: Intermediate
25-Aug-2009, 10:50 AM #9
dos command
i didnt test the script to print pdf files cause i got a little problem
in move command, i tried to do :

move c:\test pdf c:\pdf file

but it seems like move dont accept spaces in folders name

is there anyway to get out of this

thanks for helping
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
25-Aug-2009, 11:18 AM #10
"quotes"
lemings's Avatar
Member with 30 posts.
 
Join Date: Jul 2009
Experience: Intermediate
26-Aug-2009, 05:12 AM #11
dos command
i've tried quotes, but it doesnt work, here is the command :

For /F "tokens=*" %%A in ('dir /b /s "H:\partage\devis courrier\devis sb\*.pdf"') do (
move /y "%%A" H:\partage\devis courrier\divers
)

i've tried like that :
first :

For /F "tokens=*" %%A in ('dir /b /s "H:\partage\devis courrier\devis sb\*.pdf"') do (
move /y "%%A" "H:\partage\devis courrier\divers"
) doesnt work

second :

For /F "tokens=*" %%A in ('dir /b /s ""H:\partage\devis courrier\devis sb\*.pdf""') do (
move /y "%%A" "H:\partage\devis courrier\divers"
) doesnt work

can u help please
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
26-Aug-2009, 10:18 AM #12
Telling us it doesn't work really doesn't help. Do you have echo turned on in your script to see what it is doing? Are you getting any error messages?

It looks like you have the proper syntax as far as the first one goes. The only thing I can see is maybe you have a misspelling. Is it suppose to be divers or drivers

This should work
Code:
For /F "tokens=* delims=" %%A in ('dir /b /s "H:\partage\devis courrier\devis sb\*.pdf"') do (
move /y "%%A" "H:\partage\devis courrier\divers"
)
wouldn't hurt to add a delims= after the tokens options to tell it not to use any delimiters.
lemings's Avatar
Member with 30 posts.
 
Join Date: Jul 2009
Experience: Intermediate
27-Aug-2009, 09:51 AM #13
dos command
hey friend,

it works with 2 subfolders but i have to test it with 400 subfolders, till that thank u deeply.

wondering if u can help in excell too, if it is, here is the case, if it's not
thank u again :

i have an excell file wich i shared with some users, i got total control
of it and all users have the only-read, we all open the file, and i'd like
to modify it and will be seen by all the others users without they close
and re-open the file, is it possible ?

thank u once again
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
28-Aug-2009, 04:19 PM #14
Posted via Mobile Device
You should start another thread as it is totally unrelated to this one. But my gut feeling is no.
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:30 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.