1
votes

I am walking through a Visual FoxPro program trying to document the code in an effort to understand the process (I am not a FoxPro developer and have very little experience looking at the code) and I came across the "SET DEFAULT TO" command used without any drive designation specified. I checked the documentation and there are several examples on how to use it but none of them show it being used without the drive designation. The statement is literally written like this:

SET DEFAULT TO

and that's it. I am curious what this does. The documentation from Microsoft does show that the drive is optional (at least in the typical shown in square brackets [ ] way) as seen here:

enter image description here

but then they don't elaborate on what happens when the cPath parameter is left off.

Any insight would be truely appreciated.

Thanks,
Doug

2

2 Answers

2
votes

SET DEFAULT TO without a path will reset the default directory to the one specified in the 'Default Directory' setting in the Tools -> Options -> File Locations dialog.

-1
votes

Some Examples from the command window:

SET DEFAULT TO C:\MyProgramDir\MySubDir\ (enter) SET DEFAULT TO "C:\Program Files\MyApp\" (enter)

-or use the CD command

CD C:\MyProgramDir\MySubDir\ (enter) CD "C:\Program Files\MyApp\" (enter)