MrGameCube
Programmer
[Warning New User Getting Used to the Forums]
In the program that I am writting I ran into the problem where I need to source a bunch of different files in order to do this I created a variable which would hold the results of glob command *.tcl It worked great except for the fact that it grabs the name of the main file as well. So when I go through and try to source all the files it trys to source the main file in the main file.
I realize I could just check for the main files name and not source the file if it was the main file. But in all of this it brought up the question.
Is there a way for a file to know its name via some command or method without you telling it what it's name is?
Thanks in advance.
In the program that I am writting I ran into the problem where I need to source a bunch of different files in order to do this I created a variable which would hold the results of glob command *.tcl It worked great except for the fact that it grabs the name of the main file as well. So when I go through and try to source all the files it trys to source the main file in the main file.
I realize I could just check for the main files name and not source the file if it was the main file. But in all of this it brought up the question.
Is there a way for a file to know its name via some command or method without you telling it what it's name is?
Thanks in advance.