Lets say I have a folder called /folder
that looks like this:
folder
|--test.txt
|--test.cpp
All test.cpp
does is print the contents of the (relatively) local ./test.txt
. So if I compile test.cpp
to get test.exe
. Then I can call:
C:/.../folder>test
and the content of test.txt will be printed to the console.
However, if I add /folder
to my PATH
variable, I can call the test
command from anywhere on my command line. Unfortunately, the program can no longer find the test.txt
file. How can I fix this without using an absolute path? I'm working on a command line tool to aid in development.