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"

Nope. see below

        in (*.odt) means "in the set of all files of the form *.odt"

all ending in .odt    assumes system globing in use (on by default)
(Not sure globing can be turned off in MicroSoft)

        do means, well, "do this..."
        drive:\full-pathname\soffice means ... ???

location of the program named soffice which is to be executed (started).
program explicit tokens follow

                I THINK: drive:\full-pathname\ means "path to the dir
containing the files to be printed"

NO. you've already set to that directory. (cd to where files exist)
cd is change default working directory to [specified]

                \soffice ???

Not one of your icons??? :)  It is the "master" driver.
  soffice xx.odt   starts swriter, has it open xx.odt  for use
  soffice xx.xls   starts scalc  , has it open xx.xls  for use
    and so forth

Can't remember which OOo program to use for which MS file?
Put the icon for soffice on desktop and 'drag n drop' and let OOo sort it out for you. They do a bang-up good job of it. Having the specific purpose icon on desktop is handy for new files, saves a few clicks.

        -p means "send to default printer"
        %f means "end-boundary of the for loop"


actually %f is the variable to which the various things are assigned in the order found. It is then the token where the found thing is presented to the program. The FOR starts the loop and the end of line ends it.
See HELP FOR in a CMD window for multiline loops.

QUESTIONS:

1. Am I more or less on track here?

Not too bad (for a point and click type :)  Just teasing

2. Would you be willing to fill in where I have ??? ?

All done
OH!  subst is a way to assign that big long path to a drive letter.
Handy for the 'point n click' types that can't type. ;) Am I having fun or what? Seriously - It actually saves lots of grief. And as job focus changes, program location and/or data dir can be changed. If you intend to do much MSDOS work, check out the Autoexec.bat info. Among other things it can be used to modify the system search PATH for command line use. MSDOS has about 80 characters allowed per input line.


Thank you kindly,
Elchanan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


======================
Beyond all that - If one justs wants to use OOo to print a bunch of files while one goes to lunch, open the CMD, cd to dir with files and do the for statement with proper substitution of program location.
Quick, cheep, easy and it works.

Steve
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to