On that note, I may as well also point out that our server, CompleteFTP Enterprise, allows administrators to add their own SITE commands (see
here). This is done by developing a .NET assembly (i.e. DLL) and adding it as an extension (aka plug-in) to CompleteFTP.
The code for the extension would be something like this:
using System.IO;
using EnterpriseDT.Net.FtpServer.Core;
namespace SampleExtensions
{
public class DriveSpaceCommands: SiteCommands
{
[SiteCommandName("ListDriveSpace")]
public string GetDriveSpace(string drive)
{
DriveInfo driveInfo = new DriveInfo(drive);
return driveInfo.AvailableFreeSpace + " bytes";
}
}
}
This would then allow clients to do the following:
ftp> SITE ListDriveSpace D:
200- 909238409234 bytes
200 SITE command successful.
ftp>