From this you can get the file path and the file name.
You can then amend either/both to get the file path and name you require (merger the strings back together) to create or open the file you want.
I do exactly this to save text files with the names I want for quants output in the job folder, or even a sub-folder of that job folder.
Versions 6.5 to 22
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit