I'm opening a cmd window to run an ftp process. It's easy enough to close the
process (.close()), but the cmd window won't close unless I go out to the
window and type 'quit'.
How can I send a request to the cmd window to close?
Here's the code snippet that I'm using to make the call:
string strArg = "/c ftp.exe -v -n -s:" + strFile + " " + strHost + " > " +
strLogFile;
Process ftpProcess = new Process();
ftpProcess.StartInfo.FileName="cmd.exe";
ftpProcess.StartInfo.Arguments = strArg;
ftpProcess.StartInfo.CreateNoWindow=true;
ftpProcess.Start();
Below this line in the code I've tried a number of things, but they all
target the process and not the cmd window itself. The ftp process completes
successfully in just over a second.
thanks for any help.