TeX can work with files just, and they can be opened with:
\openin <number>=file path
The number has to be in a range between 0 and 15 (inclusive).