File.Ext (gb)
Static Function Ext ( Path As String ) As String
返回一个文件路径组成中的文件扩展名。
该示例显示用户选中的文件路径的信息。使用了
File.Name、
File.BaseName、File.Ext和
File.Dir方法。
Examples
PUBLIC SUB ButtonDisplayPath_Click()
IF Dialog.OpenFile() THEN RETURN
PRINT "Full file path: " & Dialog.Path
PRINT "File name (with extension): " & File.Name(Dialog.Path)
PRINT "File name (without extension): " & File.BaseName(Dialog.Path)
PRINT "File extension: " & File.Ext(Dialog.Path)
PRINT "Directory of the file: " & File.Dir(Dialog.Path)
END