![]() You can start it by navigating the menus: File ▸ Wizards ▸ Document Converter It is even simpler to use the built-in LibreOffice Document converter Assistant. Using the Bash shell on Windows is an easy way to convert a bunch of files from a format to another using a LibreOffice built-in command-line function. "/mnt/c/Program Files/LibreOffice 5/program/soffice.exe"īeware, Unix is case-sensitive, Windows is not. Then adjust the syntax to the bash requirements as described before, to get this : In the example given, it will be "C:\Program Files\LibreOffice 5\program\soffice.exe". Right-click on it, than "Properties", than copy the "Target" field content. The easiest way is to examine the shortcut you use every time you start LibreOffice. For the rest, the rules are the same, the bash shell supports the same character set as the Windows command shell as well as long filenames and filenames with spaces, provided that they are delimited by double-quotes ("). Than, the token separator under Windows is \, in the bash it is the / Unix one. The first difference is the root point : Under Windows it uses to be C:\, the equivalent in the bash shell is /mnt/c/. So, the syntax to specify a file location in the directory tree is different from the Windows one. The WSL mounts a complete file system on its own. Will convert the docx files from the current directory to their equivalent into the. "/mnt/c/Program Files/LibreOffice 5/program/soffice.exe" -convert-to odt -outdir. Give this command : -convert-to odt -outdir *.docx. ![]() cd to the directory containing the files to convert, after having created a destination directory.Once done, you will have access to a nice Bash shell running on top of the base Windows-system, and the -convert-to function will work properly, in a synchronous mode. You may have to install it first, which is quite straightforward if you follow the WSL documentation. To overcome this, a simple way is to use the Windows Subsystem for Linux (WSL) environment provided by Microsoft for its version 10 of Windows. At best, you will end with one or two files converted, but in any case, you will have to kill manually a bunch of LibreOffice processes hung in the system (twice as much as the number of files found, at first sight). It seems that all the conversions are started simultaneously, and since two instances of LibreOffice (soffice.exe) cannot run at the same time when launched from the command line, the process will never end. docx files to convert from the current directory.īut when used in the Windows Command shell, it does not work at all. For example, it is legal to use *.docx when you have a bunch of. The -convert-to function allows us to specify a set of documents by using the general wildcard syntax for files. ![]() On Windows 10 we can use a command like soffice.exe -convert-to odt my_document.docx in order to convert my_document.docx from the MS docx format to the open document format (odt). odt conversion, but the syntax and steps are the same for other formats supported by LibreOffice.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |