How to Print a .gif file From a Batch File

  • Thread starter Thread starter Steve Behman
  • Start date Start date
S

Steve Behman

I have a .gif file which, when "dragged", to a printer prints correctly as an
image.

When I attempt to get the same result from a batch file using:

"print /d:printername file."

I get garbage output. When I omit the printer name argument I get a dialog
asking several irrelevant things.

What I want to do is accomplish the same result as the drag-and-drop
operation did in a batch file (i.e. the correct printing of the .gif file as
the image it represents).
 
I recommend the PrintAny.vbs file, no console window!

Usage: PrintAny.vbs "C:\Path To\filename.ext"


Let me know if you need more help tweaking your command.


ju.c
 
Thanks very much for the response.

Unfortunately the .gif file type as**no** "Print" association.

Along the way I have learned that the drag-and-drop method actually invokes
mspaint.exe to do the printing!

Unfortunately, I have not been able to discover which command line switches
are employed in this process.

Searching the Web I have found that there are at least two switches /P and
/PT however, neither of the these produce the same result as does the
drag-and-drop.

The search continues!
 
Thanks again for your response,

The command you suggest is precisely the same one that produces garbage -- I
really don't understand why, but, that is the fact!
 
Did you restore gif association?
And, if so, did it work?

Commands must be exact. Even the pros make mistakes. Post an example, (test in the Run
box) like:

C:\WINDOWS\system32\MSPAINT.EXE "C:\Documents and Settings\User Name\My Documents\My
Pictures\Pisture.gif" /p


ju.c
 
Back
Top