StandardOutput ftp.exe

  • Thread starter Thread starter Eric ST
  • Start date Start date
E

Eric ST

Hi there,

I run a process that run ftp.exe -s [Ftp script file]

i get the StandardOutput this way :
ftpProgram = Process.Start(ftpProgram.StartInfo)
Output = ftpProgram.StandardOutput.ReadToEnd
ftpProgram.WaitForExit()

From my computer i get the output ok :
ftp> Connected to MyServer.
open MyServer
220-QTCP at MyServer.
220 Connection will close if idle more than 5 minutes.
User (MyServer:(none)):
331 Enter password.
230 MyUser logged on.
put "C:\Program Files\MyFile.txt "
200 PORT subcommand request successful.
250 File transfer completed successfully.


But when i run my application from another computer the output looks like that :
User (S7832273:(none)): open S7832273



put "C:\Program Files\MYFile.txt"


I don't get any server response when i run application from another workstation.
Note that i use the same ftp.exe file

Is this a windows setting ?
Anyone can help me ?

Thanks
 
* (e-mail address removed) (Eric ST) scripsit:
I run a process that run ftp.exe -s [Ftp script file]

i get the StandardOutput this way :
ftpProgram = Process.Start(ftpProgram.StartInfo)
Output = ftpProgram.StandardOutput.ReadToEnd
ftpProgram.WaitForExit()

From my computer i get the output ok :
ftp> Connected to MyServer.
open MyServer
220-QTCP at MyServer.
220 Connection will close if idle more than 5 minutes.
User (MyServer:(none)):
331 Enter password.
230 MyUser logged on.
put "C:\Program Files\MyFile.txt "
200 PORT subcommand request successful.
250 File transfer completed successfully.


But when i run my application from another computer the output looks like that :
User (S7832273:(none)): open S7832273

put "C:\Program Files\MYFile.txt"


I don't get any server response when i run application from another workstation.
Note that i use the same ftp.exe file

The problem is not related to VB.NET. Open the console and type "ftp --help".
 
If i run the script at the DOS command prompt i can see the FTP server response.

But i can't see it through the StandardOutput.
It's not a ftp.exe missing parameter.

Any idea ?
 
If i set UseShellExecute to True, i can see Output OK (FTP response are shown)
but if i read it through the StandardOutput no ftp response are in the stream...

If i run the script at the DOS command prompt i can see the FTP server response.

But i can't see it through the StandardOutput.
It's not a ftp.exe missing parameter.

Any idea ?

Hi there,

I run a process that run ftp.exe -s [Ftp script file]

i get the StandardOutput this way :
ftpProgram = Process.Start(ftpProgram.StartInfo)
Output = ftpProgram.StandardOutput.ReadToEnd
ftpProgram.WaitForExit()

From my computer i get the output ok :
ftp> Connected to MyServer.
open MyServer
220-QTCP at MyServer.
220 Connection will close if idle more than 5 minutes.
User (MyServer:(none)):
331 Enter password.
230 MyUser logged on.
put "C:\Program Files\MyFile.txt "
200 PORT subcommand request successful.
250 File transfer completed successfully.


But when i run my application from another computer the output looks like that :
User (S7832273:(none)): open S7832273



put "C:\Program Files\MYFile.txt"


I don't get any server response when i run application from another workstation.
Note that i use the same ftp.exe file

Is this a windows setting ?
Anyone can help me ?

Thanks
 
If i set UseShellExecute to True, i can see Output OK (FTP response are shown)
but if i read it through the StandardOutput no ftp response are in the stream...

If i run the script at the DOS command prompt i can see the FTP server response.

But i can't see it through the StandardOutput.
It's not a ftp.exe missing parameter.

Any idea ?

Hi there,

I run a process that run ftp.exe -s [Ftp script file]

i get the StandardOutput this way :
ftpProgram = Process.Start(ftpProgram.StartInfo)
Output = ftpProgram.StandardOutput.ReadToEnd
ftpProgram.WaitForExit()

From my computer i get the output ok :
ftp> Connected to MyServer.
open MyServer
220-QTCP at MyServer.
220 Connection will close if idle more than 5 minutes.
User (MyServer:(none)):
331 Enter password.
230 MyUser logged on.
put "C:\Program Files\MyFile.txt "
200 PORT subcommand request successful.
250 File transfer completed successfully.


But when i run my application from another computer the output looks like that :
User (S7832273:(none)): open S7832273



put "C:\Program Files\MYFile.txt"


I don't get any server response when i run application from another workstation.
Note that i use the same ftp.exe file

Is this a windows setting ?
Anyone can help me ?

Thanks

I might have missed the original... But are you setting use
shellexecute to false? You can't redirect output unless it is set to
false.
 
I set it to False. The output i get is incomplete, i miss all FTP
server response. The output only contain the text of my script
separated by blank line(Instead of ftp server response)

But i've made a test : I've set the useShell to True and i can see
all the Server Response in the Shell.

So, Why did i lost the server response when i redirect the
StandardOutput ?
 
Back
Top