Sorry that I misunderstood your question.
So you want to open a file in your program, and you would pass the filename as an argument to your executable, am I right?
You can do it in a command line, or a batch file, or
even with a call from other program. If you want to do
from your program, it's possible too, but a bit "harder" :)
The simple method is from command line:
-
yourprogram.exe "pathname"
-