How can I ensure that LO dies after command line command on windows?

Thanks for reading;
I am trying to run --convert-to pdf at the command line for a batch of docx files but after creating the first pdf the process stops because LO is running silently in the background. Since I can’t seem to use *.docx in windows, I tried to run a loop such as
for %i in (file1.docx file2.docx) do “~program\soffice.exe” --headless --convert-to pdf %i

but I only ever get one pdf file and task manager shows LO running in the background.

So my question really is how can I get LO to convert multiple docx files?