[Libreoffice-bugs] libreoffice batch doc converter

Jan Holesovsky kendy at suse.cz
Wed Mar 13 11:13:28 PDT 2013


Hi Prathibha,

Prathibha B píše v St 13. 03. 2013 v 22:26 +0530:

> WHen converting documents using
> 
> soffice --convert-to
> 
> files with the same names are being overwritten. Is there any option
> to prevent this.

Not that I know of, unfortunately.

> Where can I find the destination url code for this macro.

Best to mail the development mailing list for such a question :-) - I'm
CC'ing it.

You probably want to poke

http://cgit.freedesktop.org/libreoffice/core/tree/desktop/source/app/cmdlineargs.cxx

[search for "convert-to"], and also

http://cgit.freedesktop.org/libreoffice/core/tree/desktop/source/app/dispatchwatcher.cxx#n408

where the actual work is being done - you probably want to check if the
aOutFile exists, and do what you want if it does.

But I am not that sure how much it is useful to not to overwrite files
in batch mode - you can always save copies / do cleanup before the
conversion, right?

All the best,
Kendy



More information about the LibreOffice mailing list