Dart Ftp Control
Listing Property
Description
Contains the listing results from the last use of the List or NameList methods.
Property type
Read-write property
Syntax
Visual Basic
Public Property Listing As ListEntries
Remarks
Contents are updated each time the List or NameList method is used to request listing information. You can save this information for later use by assigning it to a new object.
Example
Contents will be updated each time the List or NameList method is used to request listing information. The user can save this information for later use by assigning it to a new object, as shown in the following VB example.
Private Sub Command1_Click()
	On Error Goto OnError ' use intrinsic error handling
	Ftp1.Timeout = 1000
	Ftp1.List "*.txt" ' all text files are requested
	Dim TxtListing As ListEntries
	Set TxtListing = Ftp1.Listing ' increased usage count keeps object in memory
	Ftp1.List "*.exe" ' all executable files are requested
	Dim ExeListing As ListEntries
	Set ExeListing = Ftp1.Listing ' increased usage count keeps object in memory
	Exit Sub
OnError: ' Any error jumps here
	Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
This property can also be set, as shown in the following VB example.
Dim le1 As New ListEntries
Dim le2 As New ListEntries

Private Sub Command1_Click()
	On Error Goto OnError ' use intrinsic error handling
	Ftp1.Timeout = 1000
	Ftp1.Listing = le1
	' get a listing from the current directory
	Ftp1.List
	Ftp1.Listing = le2
	' get a listing from the parent directory
	Ftp1.List "../"
	' le1 and le2 now contain listings from 2 different directories
	Exit Sub
OnError: ' Any error jumps here
	Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
See Also

Ftp Object  | Ftp Members


PowerTCP FTP for ActiveX Documentation Version 2.2
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic