conver-to pdf --outdir doesn't work

Can someone tell me what I am doing wrong? This doesn’t work:

soffice.exe --headless --convert-to pdf "test.odg" --outdir C:\Temp

But this does work, it just leaves outputs it next to soffice.exe:

soffice.exe --headless --convert-to pdf "test.odg"

I’m using LO 4.1.4.2 on Windows XP. I’m trying to write a batch script that I’m going to schedule to scan a folder and convert anything that hasn’t been converted yet.

How did the first command “not work”? Does it fail with an error, or silently? Does the target directory already exist? Is it writeable? Did you try running this command from the target directory (replacing the input file name with the full path)?