Hello!
Thanks for your answers... the problem I'm facing is about StdErr: I
need a way to read exaclty all the characters in that moment are in
that buffer, but ReadAll, AtEndOfStream are blocking. Is there a way
to count the chars so I can use Read(n)?
Quote:
> Your ReadOutput function is flawed: It will loop forever unless it
> finds the string "sftp" in the stream. Try this instead:
> Function ReadOutput(stream)
> *Do
> * If Not stream.AtEndOfStream Then
> * *strOut = strOut & stream.Read(1)
> * *If Right(strOut, 5) = "sftp>" Then
> * * strOut = Left(strOut, Len(strOut) - 5)
> * * Exit Do
> * *End If
> * Else
> * *Exit Do
> * End If
> *Loop
> *ReadOutput = strOut
> End Function