Returns a FileType object given its index or its name.
Type | Description | |||
Index as Variant | A long expression that indicates the index within collection, or a string expression that indicates the filename. | |||
File | A File object being retrieved. |
Use the Item property to retrieve the file or folder giving its index. The Count property gets the number of files in the collection. Use the Get property to get only files that matches giving patterns. Use the Get property to get files and folder being browsed. Use the BrowseFolderPath property to specify the path to the browsed folder. Use the Folder property to specify whether the File object hosts a file or a folder.
The following VB sample displays the list of files as they are displayed:
With ExFileView1.Get(VisibleItems) For i = 0 To .Count - 1 With .Item(i) Debug.Print .Name End With Next End With
The following C++ sample displays the list of files as they are displayed:
CFiles files = m_fileview.GetGet( 3 /*VisibleItems*/ ); for ( long i = 0; i < files.GetCount(); i++ ) OutputDebugString( files.GetItem( COleVariant( i ) ).GetName() );
The following VB.NET sample displays the list of files as they are displayed:
With AxExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.VisibleItems) Dim i As Integer For i = 0 To .Count - 1 With .Item(i) Debug.WriteLine(.Name()) End With Next End With
The following C# sample displays the list of files as they are displayed:
EXFILEVIEWLib.Files files = axExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.VisibleItems); for (int i = 0; i < files.Count; i++) { EXFILEVIEWLib.File file = files[i]; System.Diagnostics.Debug.WriteLine(file.Name); }
The following VFP sample displays the list of files as they are displayed:
With thisform.ExFileView1.Get(3) && VisibleItems For i = 0 To .Count - 1 With .Item(i) wait window nowait .Name EndWith Next EndWith