Earlier I had a problem with running an application on the command line. I had to provide an output directory in an argument to the application but since the folder was named "Test 123" you can guess I had a problem with escaping space character. My initial solution was to enclose the entire path in double quotes but that did not seem to work as expected.
Finally, I remembered I could solve this issue by creating a symbolic link to the folder I was writing logs to. It is very simple, all you need is to run the following command as an administrator:
mklink /D linkName target
- /D is a flag to create symbolic link for directory.
- linkName can be anything.
- target should be the full path to the directory.
Once you have created the symbolic link you can access the directory by the linkName you specified. For example if I were to open "textFile.txt", this would be the command after creating the symbolic link:
linkName\textFile.txt
which would resolve into: C:\Test 123\textFile.txt
To understand this more clearly I suggest visiting this link: https://www.2brightsparks.com/resources/articles/ntfs-hard-links-junctions-and-symbolic-links.html
Let me know if you encounter any issues. 🙂