property File.Name as String

Retrieves the file's name.

 TypeDescription 
   String A string expression that specifies the file/folder's name.  

The Name property is read-only. Use the Name property to get the file/folder name. Use the FullName property to retrieve the full path for file/folder. Use the Folder property to check if the File object holds a file or a folder. Use the BrowseFolderPath property to specify the path to the browsed folder. Use the Get method to retrieve the selected items.

The following VB sample displays the name for all selected items:

With ExFileView1.Get(SelItems)
    Dim i As Long
    For i = 0 To .Count - 1
        With .Item(i)
            Debug.Print .FullName
        End With
    Next
End With

The following C++ sample displays the name for all selected items:

CFiles files = m_fileview.GetGet( 0 /*SelItems*/ );
for ( long i = 0; i < files.GetCount(); i++ )
	OutputDebugString( files.GetItem( COleVariant( i ) ).GetFullName() );

The following VB.NET sample displays the name for all selected items:

With AxExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.SelItems)
    Dim i As Integer
    For i = 0 To .Count - 1
        Debug.WriteLine(.Item(i).FullName)
    Next
End With

The following C# sample displays the name for all selected items:

EXFILEVIEWLib.Files files = axExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.SelItems);
for (int i = 0; i < files.Count; i++)
	System.Diagnostics.Debug.WriteLine( files[i].FullName );

The following VFP sample displays the name for all selected items:

With thisform.ExFileView1.Get( 0 ) && SellItems
	local i
	for i = 0 to .Count - 1
		with .Item(i)
			wait window nowait .FullName
		endwith
	next
EndWith

 


Send comments on this topic.
© 1999-2006 Exontrol Inc, Software. All rights reserved.