Add quotes around files with whitespace "C:\Some Directory\SomeFile.txt"
Whitespaces in Environment.GetCommandLineArgs()
-
17-06-2023 - |
Question
I am trying to "parse" command line-arguments for when I start my program from a file in Explorer.
The problems seems to be that the Environment.GetCommandLineArgs()
method cuts arguments at whitespaces.
This means I cannot open files witch contains whitespaces in its filename.
Any ideas on how I can fix this?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow