Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DEFAULT vs. PATH
Message
From
31/01/2001 19:32:41
 
 
To
31/01/2001 15:45:55
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Miscellaneous
Thread ID:
00470654
Message ID:
00471041
Views:
28
>>>As you mention this... This would be "my" choice if I can choose how I want to set the directories...
>>>
>>>X:\ABC\LIVE\ this would be for the executables (via, ABC.EXE)
>>>
>>>X:\ABC\DATA\ this would be for the databases/tables
>>>
>>>X:\ABC\VFP\LIVE\ this would be for my test executables
>>>
>>>X:\ABC\VFP\DATA\ this would be for my sample data
>>>
>>>X:\ABC\VFP\CODE\ this would be for my programming directory
>>>
>>>That way, I can hardcode "everything" as "..\DATA\&alias()". If I have to do some report (fisal year or whatever) or there's some data error, I just copy *.* from DATA to VFP\DATA. Does that sound about right for us as VFP programmer? Of course, I do not have that choice here, but thats what I did (or something close to that, it's been a while) before this position. With this way, if the directories need to be moved or anything, all it takes it to move the "ABC" directory, everything elses follows (one click-and-drag). THAT is how I got the habit of using SET DEFAULT TO...

Hardcoded locastions are inevitably a problem, as is relying on a vague path to find data files. Consider storing a root path somewhere and deriving a full path at runtime; a registry key, for example, could be read once and then used as the basis of the path to use. Relying on full paths rather than the vagaries of relative paths resolved at different points during the runtime seems to be a whole lot more reliable with little if any added cost in effort, but then I don't like the pathing behavior of VFP for finding data reliably.

>>>
>>>>SET PATH TO ..\DATA; ..\GRAPHICS, ..\OUTPUT
>
>Am familiar with that and yes, I use that all the time, it's the very first thing I type when I boot up VFP 6.0. This whole thing above was referring to settings of the main.prg and the actual network directories. BTW, I don't just CD but that CD?, much more even quicker :)

You've gotta be kidding; you rely on relative pathing to save a few keystrokes that could just as easily be asigned to a keyboard macro? Seems like a death wish to me...I use relative pathing and search paths to help me when setting up for compilation, not for finding the real data at runtime. The last thing I want is to have to guess where the data file is that I was working on.


>
>>FYI, VFP 6.0 includes CD (change directory), which I can type faster than SET DEFAULT TO ... It also supports UNC (Universal Naming Convention, I think), which can help if you have problems with desktops using different drive letters for network shares. So you could CD \\MYSERVER\SHARED_RESOURCE\ABC\DATA. You may know all of this already, but it looks like you might have been coming from FoxPro 2.6.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform