Explorer: programmatically select file/directory with space in the path
- by Mike L.
When I try to select a file or directory which has a space in its path in the Windows Explorer, it selects a completely different directory:
explorer.exe "/select,C:\Program Files\foobar"
I've tried it from Java with
Runtime.getRuntime().exec(new String[] {
"explorer.exe",
"/select," + filePath
});
and with the above command line. In both cases, the same result. What can I do to solve the problem?