I wanted to say a big thank you to everyone on the list, especially Paul,
Tom and Brian.

I finally got the batch file to work.

My final code is:

for %%f in (*.htm) do (
"C:\Program Files (x86)\LibreOffice 4\program\soffice.exe" --headless
--convert-to html:"HTML" --outdir
"C:\Users\Joe\Clare\MCSLT\OutputHtmlFiles" %%f
)

I put the batch file in the directory that contains the .htm files I wanted
to convert, and it worked.  Eureka.  The batch file converted from the
crappy "Microsoft Word 2002 files saved as xml files with an .htm
extension" to normal .html files.

In my batch file above, I had to use the absolute path of soffice.exe to
get the batch file to work.  I tried putting "C:\Program Files
(x86)\LibreOffice 4\program\soffice.exe" in my %path% environment variable,
so that I could simply call soffice.exe in the batch file, but this caused
Firefox to crash on startup!  What a bizarre problem.
I confirmed this issue by removing "C:\Program Files (x86)\LibreOffice
4\program\soffice.exe" from the %path% variable, and rebooting my
computer.  Voila, Firefox worked again.
To reproduce the problem, I then re-added "C:\Program Files
(x86)\LibreOffice 4\program\soffice.exe" to the %path%, and rebooted by
computer.  Again Firefox would crash at startup.
I then removed "C:\Program Files (x86)\LibreOffice 4\program\soffice.exe"
once again from %path% and rebooted.  This again fixed the problem so that
Firefox could startup without crashing.
I believe I added the entry correctly to %path%, using a semi-colon after
the last entry in %path% to separate my new entry from the last entry.  I
have successfully modified the %path% variable before, by adding
"C:\Python34" and had no problems.

Anyway...maybe someone is interested in this apparent conflict between
soffice.exe in %path% and Firefox?

The important thing is, the batch script works thanks to all your generous
time and help

joe


On Fri, Apr 11, 2014 at 9:14 AM, Paul <[email protected]> wrote:

> On Fri, 11 Apr 2014 09:46:51 +0100
> Tom Davies <[email protected]> wrote:
>
> > Hi :)
> > So on the command-line you would do something like
> >
> > cd c:/Documents and Settings/Joe B/My Documents/html files
> >
> > to get into the right folder and then run the batch file from there.
> > I'm not sure if you can use
> >
> > cd c:
> Yes, you can use that to change directory. Note that this won't work to
> change drive, though. Each drive has its own current directory, and you
> use just a drive letter and colon to change drives. So if for example
> you are on the G drive, and you use "cd c:\users\tom\documents", it
> will change the current directory for the C drive, but you will still
> be working on the G drive. If you then type "c:" you will switch to the
> C drive, and would then already be in the documents folder that you
> previously changed to.
>
> Using the drive letter, or at least the beginning slash, is called an
> absolute path, and it will work from anywhere in the filesystem. Not
> using it, and just starting with a directory name, is called a relative
> path, and only looks in the current folder for subdirectoires with that
> name. So for example if you are in "c:\utils", and you type "cd
> c:\docs\paul", you will go to the "paul" folder under "docs", which is
> off the root of the C drive, but if you just typed "cd docs\paul", it
> would try to go to the "paul" folder under the "docs" folder under the
> "utils" folder, which you are currently in.
>
> > tbh, i think you have to skip the c: bit and plunge straight into the
> > rest of it.  Also there is likely to be problems with the spaces so
> > you might have to use "escape characters" making it more like
> >
> > cd "Documents and Settings"/"Joe B"/blah..
> Actually, you can surround the whole path in a single set of quotes,
> like so:
>
> cd "Documents and Settings/Joe B/blah.."
>
> Also, note that on windows it's "\" as directory separators, but on *nix
> it's "/", although "/" does actually (usually) work on windows too.
>
> > or
> >
> > cd Documents\ and\ Settings/Joe\ B/My\ Documents/html\ files
> I just tried this, and it doesn't seem to work on windows, although it
> does on *nix.
>
> Paul
>
> --
> To unsubscribe e-mail to: [email protected]
> Problems?
> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
> List archive: http://listarchives.libreoffice.org/global/users/
> All messages sent to this list will be publicly archived and cannot be
> deleted
>
>

-- 
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to