PutFile Function | |
-- todo --
Invokes the Save As dialog box and returns the file name you specify.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION PutFile(
cCustomText,
cFileName,
cFileExtensions
) AS STRING CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static string PutFile(
Usual cCustomText = default,
Usual cFileName = default,
Usual cFileExtensions = default
)
Request Example
View SourceParameters
- cCustomText (Optional)
- Type: Usual
Specifies custom text to appear in the Save As dialog box.
- cFileName (Optional)
- Type: Usual
Specifies the default file name displayed in the text box.
- cFileExtensions (Optional)
- Type: Usual
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. The cFileExtensions parameter cannot exceed 254 characters in length.
For a list of X# 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:
Return Value
Type:
String
Character
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.
Examples 1gcTableName = GetFile('DBF', 'Open Table:')
2Use (gcTableName)
3gcDelimName = Alias( ) + '.DLM'
4gcDelimFile = PutFile('Delimited file:', gcDelimName, 'DLM')
5IF EMPTY(gcDelimFile)
6CANCEL
7ENDIF
8COPY TO (gcDelimFile) DELIMITED
9MODIFY FILE (gcDelimFile) NOEDIT
See Also