On 31/10/2008 17:27, VLM TechSubs wrote:
-----Original Message-----
From: norseman [mailto:[EMAIL PROTECTED]
Sent: Friday, October 31, 2008 9:58 AM
To: [email protected]
Subject: Re: [users] Print contents of a folder
Peter Davies wrote:
Thanks, James, your solution is a good one.
Note: Harold that your solution only works when the format is
recognized by windows, I use .odt which is not recognized(word formats
are, though there might be something along the lines of a audio codec
that would solve the problem), this is because windows explorer needs
to recognize the file as a document to give options like print.
Peter
On Fri, Oct 31, 2008 at 11:50 AM, James Knott <[EMAIL PROTECTED]>
wrote:
Peter Davies wrote:
Does anyone know how to print the contents of a folder(all documents
in the folder), without having to open each one individually and
print it.
Peter
Select all the documents and drag them to the printer.
---------------------------------------------------------------------
Peter;
As a last resort:
open a MSDOS (CMD) Window
cd to dir to print
for %f in (*.odt) do drive:\full-pathname\soffice -p %f Check
printer connection, ink levels and paper supply first.
(The .odt can be any extension OOo understands and can print. If you know
that all extensions are OOo compatible and want the whole dir, use (*.*).)
If you are one of those that use the default setups and all your stuff is
buried way down a path, take a look at subst.exe (in win/system32).
In CMD window - help subst
HTH
Steve
[EMAIL PROTECTED]
---------------------------------------------------------------------
Steve,
For those of us less DOS-aware, to clarify the syntax is:
for %f in (*.odt) do drive:\full-pathname\soffice -p %f
where:
for specifies a loop
%f means "begin-boundary of the for loop"
in (*.odt) means "in the set of all files of the form *.odt"
do means, well, "do this..."
drive:\full-pathname\soffice means ... ???
I THINK: drive:\full-pathname\ means "path to the dir
containing the files to be printed"
\soffice ???
-p means "send to default printer"
%f means "end-boundary of the for loop"
QUESTIONS:
1. Am I more or less on track here?
More or less. The "%f" is the user's choice of name for a variable
which successively takes the name of each file. It then is used as the
name of the file to be printed in "...soffice -p %f" which says run
soffice with the -p (print) option and make it operate on the file named
by the variable %f. So, if the directory has in it files named a.odt,
b.odt and c.odt then the variable %f will, in turn take those values one
at a time. To be more precise, the name of the variable is actually just
"f"; the % indicates that what follows is the name of a variable.
The "%f" is *not* a boundary.
For Windows's own help on this do:
Start>Run>CMD
In the Command box that opens enter "Help for". This explains the syntax
of the "for loop".
--
Harold Fuchs
London, England
Please reply *only* to [email protected]