Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can anyone think of a way for an script included file to determine what path the include was from? For example, if my script contains:
$(Include=..\foo\bar\myfile.qvs);
Is there any way for the script in myfile.qvs to derive that it was loaded from ..\foo\bar\? Relative or absolute, doesn't matter to me.
Thanks,
Rob
Hi Rob,
Not sure why you need this. When you are including the file in the script, you already know the path. If you want to refer it in the fron-end, you might use a variable to hold that, or a simple load statement with FilePath(). Am I missing something?
Hi Tresco,
As to why I need this. The requirement is for the QVC script library (and other projects) I maintain. It would be useful for the library to be able to reference (as in a LOAD) other files in the same directory. I don't need it in the front end, but in included script. A workaround I've considered is to require the user to set a variable like:
SET Qvc.Path=..\foo\bar\;
$(Include=$(Qvc.Path)myfile.qvs);
Then the "Qvc.Path" variable will give me what I need. But it would be much more elegant if the user was not required to set the Qvc.Path variable.
-Rob