PUTFILE( ) Function

Example   See Also

Invokes the Save As dialog box and returns the file name you specify.

Syntax

PUTFILE([cCustomText] [, cFileName] [, cFileExtensions])

Returns

Character

Arguments

cCustomText

Specifies custom text to appear in the Save As dialog box. In Windows 3.x, the text appears as the dialog box title. In Windows95, the custom text replaces the File Name label.

Note that under Windows 95, long captions may be truncated.

cFileName

Specifies the default file name displayed in the text box.

cFileExtensions

Specifies file name extensions. Only file names with the specified extension are displayed in the scrollable list of the Save As dialog box when the All Files check box is cleared. The first extension in cFileExtensions is automatically appended to the file name entered if an extension isn't included with the file name. For a list of Visual FoxPro file extensions and corresponding creator types, see the File Extensions and File Types online topic.

The character expression cFileExtensions can take one of the following forms:

Remarks

Use PUTFILE( ) to choose an existing file name or specify a new file name. PUTFILE( ) returns the file name with its path. If you don't enter a file name, PUTFILE( ) returns the default file name (specified with cFileName) and extension (specified by cFileExtensions). If you choose Cancel or press ESC, PUTFILE( ) returns an empty string. You can use the file name that PUTFILE( ) returns to name a file and save it to disk.