Jim:
How about something like
SET DEFAULT TO Justpath(SYS(16))
>I think I've asked this question before and never really got a satisfactory answer, but I would think it's a simple thing I just keep overlooking.
>
>How do I find out progamatically what the full path (drive letter/share + directory path) for a given program from within itself?
>
>For example, I start up vfp, go to the command window and type
>
>do x:\myprograms\test1
>
>At that point, the default directory is set to the one vfp is installed in. How at that point could I write a line of code in test1.prg that says
>
>set default to (the directory I - test1.prg - am in)
>
>instead of having to hardwire
>
>set default to x:\myprograms
>
>I'd like to do this so if I write a program, it sets it's default directory to it's own path, opens a table that has path variables for a number of different files it will be using on different parts of the network, without the need for hard wiring the original default directory in it's own path. That way, I can move it to another path without worrying about having to re-hardwire it every time I move it.
>
>regards,
>
>JE