Actually, most of Windows FTP commands (and Unix FTP commands)do not directly correspond to actual FTP protocol commands. For example, 'bin' corresponds to "TYPE I", 'get' corresponds to a sequence of "PORT" / "RETR" commands, 'bye' corresponds to "QUIT", and 'lcd' is a local-only command that is not even send to the server (which knows nothing about S:\Temp
and the structure of client's file system and its network share drives).
So I guess what you need is to implement an FTP client based on Rebex FTP/SSL that is more-or-less compatible with Windows FTP. Our FtpConsoleClient sample (available with our Rebex FTP/SSL install package) is quite close and implements the following commands:
! disconnect rmdir rmtree
? exit user auth
ascii help chmod ccc
active ls get
binary mkdir put
bye open getr
cd passive putr
close pwd putdir
dir quit getdir
Extending it to be able to execute scripts and adding commands like 'lcd' or 'lpwd' should be quite simple - use: Directory.SetCurrentDirectory(path)
for 'lcd';
Directory.GetCurrentDirectory()
for 'lpwd'.