The path to the input file will be passed into your program as a command line argument when your program is called. code example
Example 1: how to get command line arguments in python
#!/usr/bin/python
import sys
print 'Number of arguments:', len(sys.argv), 'arguments.'
print 'Argument List:', str(sys.argv)
Example 2: get input from command line and run command in c++
> args my_file.txt
Line fab
Line fab
Line edc