Output path %O for plugins - relative?

Using the BOM generator as follows

xsltproc -o "%O.csv" "C:\Users\Greg\Documents\KiCad\6.0\scripting\plugins\bom2grouped_csv_jlcpcb.xsl" "%I"

This puts the output file in my project folder, but I would like it to go to a subfolder.

Is there a relative path option? All I’ve found in the help button is these options :

The command line format accepts parameters for filenames. The supported formatting parameters are: 

%B: base filename of selected output file, minus path and extension. 
%P: project directory, without name and without trailing '/'. 
%I: complete filename and path of the temporary input file (the intermediate net file). 
%O: complete filename and path (but without extension) of the user chosen output file. 

Using this string
xsltproc -o "%P\gerber\bom.csv" "C:\Users\Greg\Documents\KiCad\6.0\scripting\plugins\bom2grouped_csv_jlcpcb.xsl" "%I"

I get this output

xsltproc -o "C:\Users\Greg\Desktop\megadesk\PCB\gerber\bom.csv" "C:\Users\Greg\Documents\KiCad\6.0\scripting\plugins\bom2grouped_csv_jlcpcb.xsl" "C:\Users\Greg\Desktop\megadesk\PCB\megadesk.xml"
Command error. Return code 11.
I/O error : Invalid argument
I/O error : Invalid argument

That looks good to me, just make sure that the folder exists beforehand.

It does.

Note using the default %O.csv, this it the output

xsltproc -o "C:/Users/Greg/Desktop/megadesk/PCB/megadesk.csv" "C:\Users\Greg\Documents\KiCad\6.0\scripting\plugins\bom2grouped_csv_jlcpcb.xsl" "C:\Users\Greg\Desktop\megadesk\PCB\megadesk.xml"
Success.

All I can see different is forward slash versus backward slash.

Bah, indeed. It’s the slashes. I’ll open something on GitLab about generating forward slashes on Windows.

This discussion seems related. Looks like some xslt processors are very picky about slashes on windows.