Command Reference : Programming Language Reference
Syntax: @linepath
Return: string
Returns a string containing the location of the program currently being executed. If @linepath is being executed as a child program from a parent as part of an include or exec statement, the string will return the location of the child program.
If the program d:\myprogs\program1.prg has the line:
string y = @linepath
then y will contain “D:\MYPROGS\PROGRAM1.PRG”, no matter if program1 is run by itself, or as part of another program.
See also @evpath and @temppath.