Specifying paths with spaces in rfluxmtx commands

Hi,

Is there a proper approach to specifying paths of octrees with spaces in them when using rfluxmtx? I was able to make it work by using a path with three quotes. I am just wondering if using three quotes is indeed a error-proof way to ensure that paths with and without spaces can be specified for rfluxmtx.

For example, in the below case (without quotes), the second command will fail as it has a space in the path:

rfluxmtx -v -I+ -ab 1 -ad 500 -lw 0.002 -n 16 -y 100  - objects/GlazingVmtx.rad -i octrees/room3ph.oct < points.txt > matrices/vmtx/v3.mtx
rfluxmtx -v -I+ -ab 1 -ad 500 -lw 0.002 -n 16 -y 100  - objects/GlazingVmtx.rad -i oc trees/room3ph.oct

In the below case, the second command will still fail as it seems that rfluxmtx strips off the quotes while passing it to oconv:

rfluxmtx -v -I+ -ab 1 -ad 500 -lw 0.002 -n 16 -y 100  - objects/GlazingVmtx.rad -i "octrees/room3ph.oct" < points.txt > matrices/vmtx/v3.mtx
rfluxmtx -v -I+ -ab 1 -ad 500 -lw 0.002 -n 16 -y 100  - objects/GlazingVmtx.rad -i "oc trees/room3ph.oct" < points.txt > matrices/vmtx/v2.mtx

However, with triple quotes, both commands (with and without spaces in path,) will work:

rfluxmtx -v -I+ -ab 1 -ad 500 -lw 0.002 -n 16 -y 100  - objects/GlazingVmtx.rad -i """octrees/room3ph.oct""" < points.txt > matrices/vmtx/v3.mtx
rfluxmtx -v -I+ -ab 1 -ad 500 -lw 0.002 -n 16 -y 100  - objects/GlazingVmtx.rad -i """oc trees/room3ph.oct"""< points.txt > matrices/vmtx/v2.mtx

getinfo on both cases, showing successful runs…

Regards,
Sarith

Hi Sarith,

This is an interesting problem, and not one I’ve encountered. On Unix systems, your first solution with enclosing in double quotes works fine. Single quotes would also work. This is because when the subsequent command argument needs to be quoted within another set of quotes for the oconv command, Unix shells offer these two quoting methods. (Not quite as generous as Perl, but it’s enough in this circumstance.)

I understand why triple-quoting works in Unix, but I honestly don’t know why it works under Windows. If it does, great, then you’ve invented at least one solution to this problem. I don’t understand Windows well enough to suggest another.

Cheers,
-Greg

Hi Greg,

Thanks for clarifying this.

Regards,
Sarith