HOWTO: Determining Paths of Operating System Folders

Last reviewed: August 4, 1997
Article ID: Q172319
The information in this article applies to:
  • Microsoft FoxPro for Macintosh, version 2.6a
  • Pro Edition of Microsoft Visual FoxPro for Macintosh, version 3.0

SUMMARY

The SYS(2033,n) returns the path information for either the System folder, Extensions folder, Preferences folder, or the Microsoft folder. The value of "n" determines the folder and the path being returned.

MORE INFORMATION

Often, the exact path to a particular folder on the machine needs to be known. For example, FoxPro 2.6a for the Macintosh places the FoxTools.mlb file in the Extensions folder. Since both hard drive names and folder names can vary between machines, there is no way to hard code a path that would work on all machines. The SYS(2033,n) function is useful in determining this information.

According to the Help File, the SYS(2033,n) function has four values for the numeric expression n. These values and the folders they return are:

   0    System Folder
   1    Extensions Folder
   2    Preferences Folder
   3    Microsoft Folder

For example, in FoxPro 2.6a for the Macintosh, the SYS(2033,1) function can be used in conjunction with the SET LIBRARY TO command to point to the FoxTools.mlb file in the Preferences folder.

   SET LIBRARY TO SYS(2033,2)+":FoxTools.mlb"
   ? SET("LIBRARY")  &&& Returns FoxTools.mlb

REFERENCES

Microsoft Visual FoxPro Help file Microsoft FoxPro Help file


Additional query words: Extensions System Preferences Microsoft
Keywords : FoxMac FxprgGeneral VFoxMac
Version : MACINTOSH:2.6a,3.0
Platform : MACINTOSH
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 4, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.