I suppose I should have mentioned above that the script will work with filenames/paths that include spaces, whether or not the filename is wrapped in double-quotes (the typical way to refer to Windows names with embedded spaces.
Some additional examples of what will work (the I character is included to show a reasonable right-click/caret point):
I am some text with c:\folder with spaceIs\file with spaces.txt a filepath right in the middle of me And of course wrapping in double quotes works "c:\foldeIr with spaces\file with spaces.txt" too Even without spaces you can have other text directly adjoining the name |c:\teIst1\test2.txt| Even other characters directly adjoining will work c:\test3\tIest4.txtzzzz (opens test4.txt – presuming test4.txtzzzz / test4.txtzzz / test4.txtzz / test4.txtz all don’t exist – if any did, they’d be opened before test4.txt )