Y
Yash
If on the command line, I type ftp <machine> > C:\temp\ftp.out, and
then keep typing FTP commands, the output of the FTP session correctly
goes to the C:\temp\ftp.out file.
This output contains:
ftp> Connected to lille.
open lille
220 lille.intranet.pspl.co.in FTP server (Version 1.1.214.8 Fri Apr 20
07:27:42 GMT 2001) ready.
ftp> user myname mypass
331 Password required for myname.
230 User myname logged in.
ftp> put C:\a.txt
200 PORT command successful.
150 Opening ASCII mode data connection for a.txt.
226 Transfer complete.
ftp: 26228 bytes sent in 0.00Seconds 26228000.00Kbytes/sec.
ftp> bye
221 Goodbye.
Note that the ftp> prompt, and status numbers ( 220, 226, etc.) have
been sent to the standard output.
We want to run an FTP session from a VB .NET program. We redirected
the StandardInput/Output/Error of the Process object that invokes the
FTP program, and also set UseShellExecute to False.
I notice that commands sent to the processes StandardInput are
properly getting executed. However, if I read the StandardOutput, the
status messages do not get read. Nor does the command prompt.
Only messages like
ftp: 26228 bytes sent in 0.00Seconds 26228000.00Kbytes/sec. or
Connected to lille
etc. get read.
What can I do to make sure all messages can be read from the
StandardOutput?
Thanks
then keep typing FTP commands, the output of the FTP session correctly
goes to the C:\temp\ftp.out file.
This output contains:
ftp> Connected to lille.
open lille
220 lille.intranet.pspl.co.in FTP server (Version 1.1.214.8 Fri Apr 20
07:27:42 GMT 2001) ready.
ftp> user myname mypass
331 Password required for myname.
230 User myname logged in.
ftp> put C:\a.txt
200 PORT command successful.
150 Opening ASCII mode data connection for a.txt.
226 Transfer complete.
ftp: 26228 bytes sent in 0.00Seconds 26228000.00Kbytes/sec.
ftp> bye
221 Goodbye.
Note that the ftp> prompt, and status numbers ( 220, 226, etc.) have
been sent to the standard output.
We want to run an FTP session from a VB .NET program. We redirected
the StandardInput/Output/Error of the Process object that invokes the
FTP program, and also set UseShellExecute to False.
I notice that commands sent to the processes StandardInput are
properly getting executed. However, if I read the StandardOutput, the
status messages do not get read. Nor does the command prompt.
Only messages like
ftp: 26228 bytes sent in 0.00Seconds 26228000.00Kbytes/sec. or
Connected to lille
etc. get read.
What can I do to make sure all messages can be read from the
StandardOutput?
Thanks