Ask Your Question

How to create a Batch for converting multiple files from a folder to another [closed]

asked 2017-02-03 08:32:58 +0100

Alex27 gravatar image

updated 2020-09-23 12:37:41 +0100

Alex Kemp gravatar image

Hi, this is my first time that i ask something.

I have to create a batch that convert a lot of sxd files from a folder in png to put in another folder.

If i try this: "C:\Program Files (x86)\LibreOffice 5\program\soffice.exe" --headless --convert-to png --outdir "output folder" "input folder\filename.sxd" it works, but i have to convert many of these.

How can i do? I try so many solution, but no one is working

P.S. i'm using windows 7 nad LO 5.2.5

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-09-23 12:38:04.159840

2 Answers

Sort by » oldest newest most voted

answered 2017-02-03 08:58:33 +0100

updated 2017-02-03 09:03:30 +0100

Windows shell/console does not expand wildcards (unlike *nix), and LO itself does not process them, too. Put something like this to a batch file:

for %%f in ("input folder\*.sxd") do "C:\Program Files (x86)\LibreOffice 5\program\soffice.exe" --headless --convert-to png --outdir "output folder" "%%f"

Note: if using command like interactively, %%f should be replaced with %f

edit flag offensive delete link more


you're a GOD thank you!!!

Alex27 gravatar imageAlex27 ( 2017-02-03 09:08:13 +0100 )edit

answered 2017-02-03 08:41:08 +0100

robleyd gravatar image

Have you tried a wildcard? "input folder*.sxd"

edit flag offensive delete link more


yes, but it's not working

Alex27 gravatar imageAlex27 ( 2017-02-03 08:43:47 +0100 )edit

Question Tools

1 follower


Asked: 2017-02-03 08:32:58 +0100

Seen: 2,264 times

Last updated: Feb 03 '17