This document contains the
release information for the .NET FTPClient
sample. You will find the following
sections below:
The purpose of this sample if to show how you can
create your own pluggable WebRequest protocol. This
sample creates an FTP pluggagle protocol.
This sample list located in the FTPClient
directory of the .NET SDK sample directories.
For
Example:
C:\Program
Files\Microsoft.NET\Samples\FTPClient
In order to properly build and run this sample, the
following steps need to be performed prior to building and running the sample…
·
Type NMAKE /f makefile.ftp all from
the command line.
For Example:
C:\Program Files\Microsoft.NET\Samples\FTPClient\:>NMAKE
/f makefile.ftp all
In order to run this sample, follow the
instructions listed below.
For Example:
C:\Program Files\Microsoft.NET\Samples\FTPClient\:>FTPClient /?
In
order to add support for custom verbs, do the following:
For Example:
if( command.Equals("USER")
|| command.Equals("PASS")
|| command.Equals("CWD")
|| command.Equals("PWD")
|| command.Equals("CDUP")
|| command.Equals("QUIT"))
|| command.Equals(“MY_NEW_COMMAND”)
return FtpCommandType.FtpControlCommand;
·
In GetServerCommand, add an entry
for this command. The input to this function is the client version of the
command (eg “DIR”) and the output of this function is
the version the server understands (eg “LIST”). You
can get a list of commands the server understands by typing “REMOTEHELP” in the
FTP client window of any other FTP client.
This function should return the equivalent
command unserstood by the server. For eg, if your new command is “delete”, then the server
version of that should be “DELE”