'DeclarationPublic Event SendingFile As TransferringFileEventHandler
'UsageDim instance As FtpClient Dim handler As TransferringFileEventHandler AddHandler instance.SendingFile, handler
public event TransferringFileEventHandler SendingFile
The event handler receives an argument of type TransferringFileEventArgs containing data related to this event. The following TransferringFileEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| LocalFilename | Gets the path and filename of the local file. |
| RemoteFilename | Gets the filename of the remote file. |
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" ' Set license key here to deploy Dim ftp As New FtpClient() AddHandler ftp.SendingFile, AddressOf Me.sending_file ftp.Connect( "localhost" ) ftp.Login() ftp.SendMultipleFiles( "C:\Demos\*", True, True ) ftp.Disconnect() Private Sub sending_file( ByVal sender As Object, ByVal e As TransferringFileEventArgs ) listBox1.Items.Add( "SENDING " + e.LocalFilename.ToUpper() + " TO " + e.RemoteFilename.ToUpper() ) listBox1.Refresh() End Sub
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" // Set license key here to deploy FtpClient ftp = new FtpClient(); ftp.SendingFile += new TransferringFileEventHandler( this.sending_file ); ftp.Connect( "localhost" ); ftp.Login(); ftp.SendMultipleFiles( @"C:\Demos\*", true, true ); ftp.Disconnect(); private void sending_file( object sender, TransferringFileEventArgs e ) { listBox1.Items.Add( "SENDING " + e.LocalFilename.ToUpper() + " TO " + e.RemoteFilename.ToUpper() ); listBox1.Refresh(); }
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" // Set license key here to deploy FtpClient ftp = new FtpClient(); ftp.SendingFile += new TransferringFileEventHandler( this.sending_file ); ftp.Connect( "localhost" ); ftp.Login(); ftp.SendMultipleFiles( @"C:\Demos\*", true, true ); ftp.Disconnect(); private void sending_file( object sender, TransferringFileEventArgs e ) { listBox1.Items.Add( "SENDING " + e.LocalFilename.ToUpper() + " TO " + e.RemoteFilename.ToUpper() ); listBox1.Refresh(); }
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Standard: netstandard2.0, netstandard2.1
.NET Framework: net20, net35, net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.