How do you show a file in windows explorer using Go?
This command works as expected from the command line:
explorer /select,C:\data\My File.txt
I can't get the same command to work using Go's exec.Command()
method, no matter what combination of arguments tried.
This works:
exec.Command(`explorer`, `/select,C:\data\MyFile.txt`) // SUCCEEDS
but fails with a space in the filename.
exec.Command(`explorer`, `/select,C:\data\My File.txt`) // FAILS
Notes: