Suppose you have
C:\foo\foo.bat which needs to refer to
C:\foo\foo.txt. It may be run from a different directory, but needs to get
foo.txt from its own directory, not the current directory. Obviously this could be done by putting the full path
The twist is, it's not known at the time of writing the batch file, where it will end up residing on the user's machine, so what the batch file actually needs to do is get foo.txt from the directory where I live, wherever that happens to be. (In a C program I'd use
argv but that doesn't seem to work with batch files.)
Is there a way to do this?