Microsoft KB Archive/97642

{| = How to Return Entire MS-DOS Path from PROMPT FILES List =
 * width="100%"|

ID: Q97642

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5x, 2.6x
 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6x
 * Microsoft FoxPro for Macintosh, versions 2.5x, 2.6a
 * Microsoft FoxPro for UNIX, version 2.6

SUMMARY
When you create a list popup in FoxPro using the PROMPT FILES clause, the entire path is not stored in the variable.

MORE INFORMATION
To have the entire path returned, do the following:

1. In the setup code of the screen, define a popup with the PROMPT FILES

clause. For example:

DEFINE POPUP popfile PROMPT FILES LIKE *.dbf 2. In the setup code, define as character the variable that the list will be using. Also, define a character variable to which the entire path will be stored. For example:

var=''    && List variable entire='' && Variable for entire path 3. To create the list, do one of the following, depending on which platform you are using:

- In FoxPro for MS-DOS, position the cursor on the screen in the place where you want the list to appear. From the Screen menu, choose List, select From Popup, and type &quot;popfile&quot; (without the     quotation marks) as the popup name. In the Variable box, type &quot;var&quot; (without the quotation marks).

- In FoxPro for Windows, click the list tool, then click in the Screen Design window where you want the list to appear and drag the list to the desired size. The List dialog box will open. In     the dialog box, select From Popup, and type &quot;popfile&quot; (without      the quotation marks) as the popup name. In the Variable box, type &quot;var&quot; (without the quotation marks). 4. In the Valid procedure, type the following code: entire=PRMBAR(&quot;popfile&quot;, 2)+var 5. The variable called &quot;entire&quot; now contains the entire path to the selected file, as well as the filename. To verify this, include the following statement after the command given in step 4:

WAIT WINDOW entire Additional reference words: FoxDos FoxWin FoxMac FoxUnix 2.00 2.50 2.50a 2.50b 2.60 2.60a pop-up fullpath full-path KBCategory: kbprg KBSubcategory: FxprgGeneral
 * }