Question: Finding out a path of Maple program (executed code) run

In my Maple program results are exported to a file. But the problem is that I should write a path every time manually that complicates a work. Moreover, I often forget to change a path and correspondingly new results would often rewrite previous results stored in other directory. The reason is that the path of stored results folder have to be the same as the path of Maple code run.

How can to do it automatically? How to make that Maple knows a path from where Maple program is run? By the way I can work in command line if it is decisive.

Sorry for my English.

Please Wait...