How to Determine the Path to the Macintosh DesktopLast reviewed: June 1, 1996Article ID: Q114806 |
The information in this article applies to:
SUMMARYThe Macintosh desktop is the background area displayed on a Macintosh. It contains icons for folders, applications, disks, and the Trash. In FoxPro, the desktop is referenced as a subfolder (subdirectory), called "Desktop Folder," in the main volume (hard disk).
MORE INFORMATION
Steps to Determine the Volume's NameType the following in the Command window:
SET VOLUME C: TO && Clears VOLUME setting, if any SET DEFAULT TO && Makes the volume's root the current directory ?SYS(5) && Returns the current volume (disk) name Steps to Set the Default to a Folder in the DesktopThese steps assume that the volume (disk) name is "Macintosh HD:". If needed, use the steps listed above to determine your volume's name.
Example of Code That's Independent of Folder or Volume Name
CLEAR CLEAR ALL DEFINE WINDOW GetInfo FROM 0,0 to 20,70 ACTIVATE WINDOW GetInfo MOVE WINDOW GetInfo Center @ 0,0 SAY "This example will set the default directory to" @ 1,0 SAY "<volume name>:\<FoxPro folder> and then use the " @ 2,0 SAY "CUSTOMER.DBF table in area #1. This will demonstrate" @ 3,0 SAY "how to make your code independent of any specific" @ 4,0 SAY "folder or volume name..." FPFOLDER = " " @ 6,0 SAY "Enter the folder name where FoxPro is installed" @ 7,0 GET FPFolder PICTURE "XXXXXXXXXXXXXXXXXX" DEFAULT "MyFolder" READ FPFOLDER = ALLTRIM(FPFolder) @ 8,0 SAY "------------" @ 9,0 SAY "Volume name is: "+SYS(5) @ 10,0 SAY "Currently located in: "+SYS(2003) CURLOC = SYS(5)+ FPFOLDER @ 11,0 SAY "Setting default directory/folder to: "+CURLOC SET DEFAULT TO (Curloc) @ 12,0 SAY "Using "+CURLOC+":Tutorial:CUSTOMER.DBF in area # 1" SELECT 1 USE "TUTORIAL\CUSTOMER" IN 1 |
Additional reference words: VFoxMac 3.00b FoxMac 2.50b 2.50c desk top
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |