Hi,
I'm not sure I understand the Fullpath() command, as I get unexpected
results when trying to use it. Perhaps it's best to state what I
need, and explore if Fullpath is the right way to go.
I have written many small progs in FoxPro2.5a for Windows. Originally
for a stand alone machine, they are now accessible over a small (3 pc)
network in my office. Originally, most directories were hard coded
into my apps, but now I would like to run these apps from any of the 3
pc's on the network. Since FoxPro2.5 doesn't support the
\\computername\\drive\\directory\\ naming convention, I am forced to
use drive letters to designate files. Dive letter mapping works;
however, the server's "C:\" drive is mapped as the "G:\" drive on the
2 workstations so when the apps are run from the server they
(accurately)
look for files on drive "C" but when run on the workstations, they
NEED to look on drive "G", but of course don't.
How can I tell my apps "when you're on the workstations, use drive G:"
?? Or (probably better) find the exact path of a file in realtime
relative to the machine requesting it, and call it that way?
I thought using fullpath would help me determine the path of a file to
be retrieved, and I could somehow test which machine is running, and
prepend the respective drive letter, but fullpath has me all turned
around. I do not understand the concept or the results I am getting.
MS documentation on this command is poor.
What is the purpose of having to specify the second argument in
fullpath? If you know the path relative to the first argument, why
not just use it? Fullpath keeps returning the name of the file
specified in argument 1 as being in the directory from argument 2.
i.e. fullpath("\sometable.dbf", "C:\foxpro\new") returns
c:\foxpro\new\sometable.dbf when in actuality it is not located in the
"new" directory, but in the "foxpro" directory. I don't get it. It
just appears to be stringing the two together. Is this even the way I
should be approaching my problem?
Any insight would very helpful. I have been using FoxPro since 1994,
but I'm only an intermediate level user. I have never written stand
alone apps, but I'm not totally a novice either. I'm just stuck in
the middle.
Thanks,
Jim