property Edit.FileName as String
Specifies the name of the file being loaded or saved.

TypeDescription
String A string expression that indicates the name of the file being loaded or saved.
Use the FileName property to identify the name of the file being loaded or saved. Use the Load/LoadFromUnicode method to load files. Use the Save/SaveAsUnicode method to save control's content to a file.   

The following VB sample extracts the name of the file from the path:

Private Function title(ByVal s As String) As String
    Dim i As Long
    i = InStrRev(s, "\")
    If i > 0 Then
        title = Right(s, Len(s) - i)
    Else
        title = s
    End If
End Function

The following C++ sample extracts the name of the file from the path:

CString title( LPCTSTR szFileName )
{
	CString strTitle( szFileName );
	int p = strTitle.ReverseFind('\\');
	if ( p >= 0 )
		strTitle = strTitle.operator LPCTSTR() + p + 1;
	return strTitle;
}

The following VB.NET sample extracts the name of the file from the path:

Private Function title(ByVal s As String) As String
    Dim i As Long
    i = InStrRev(s, "\")
    If i > 0 Then
        title = Microsoft.VisualBasic.Right(s, Len(s) - i)
    Else
        title = s
    End If
End Function

The following C# sample extracts the name of the file from the path:

private string title(string szFilename)
{
	string strTitle = szFilename;
	int p = strTitle.LastIndexOf('\\');
	if (p >= 0)
		strTitle = strTitle.Substring(p + 1);
	return strTitle;
}

The following VFP sample extracts the name of the file from the path:

local strTitle, p
strTitle = thisform.Edit1.FileName
p = rat('\',strTitle)
if ( p > 0 )
	strTitle = substr(strTitle,p + 1)
endif
wait window strTitle