VB.NET, C#
The Ftp Client sample application demonstrates how to use the various properties, methods and events exposed by the FtpClient class in a console application similar to the command prompt FTP client.
It specifically demonstrates how to:
Handle the CommandSent, Disconnected, FileTransferStatus, MultipleFileTransferError, ReceivingFile, ReplyReceived and SendingFile events.
Change the current working folder by using the ChangeCurrentFolder method.
Change to the parent folder of the current working folder by using the ChangeToParentFolder method.
Use the RepresentationType property to transfer files in ASCII or binary mode.
Change the currently logged-in user using the ChangeUser method.
Create a folder on the FTP server using the CreateFolder method.
Delete files and folders from the FTP server using the DeleteFile and DeleteFolder methods.
Retrieve the state of the FTP client using the State and Connected properties.
Retrieve the current working folder using the GetCurrentFolder method.
List the contents of the FTP server's current working folder using the GetRawFolderContents method.
Use the SendCustomCommand method to send custom FTP commands to the FTP server.
Receive files using the ReceiveFile and ReceiveMultipleFiles methods.
Use the RenameFile method to rename a file on the FTP server.
Send files using the SendFile, SendFileToUniqueName and SendMultipleFiles methods.
Master directory:
<SamplesInstallDir>Xceed Zip for .NET [version]\
Where <SamplesInstallDir> by default is <SystemVolume>Xceed Samples under Windows Vista/7, and <ProgramFiles>Xceed Samples under Windows XP. NOTE: The sample applications for Xceed's FileSystem based products are all contained in the "Xceed Zip for .NET" folder.
C#: \CSharp\ConsoleFtp\ConsoleFtp.csproj
VB.NET: \Visual Basic .NET\ConsoleFtp\ConsoleFtp.vbproj