I am try to test my ftp connection,
I need to recover the time it takes to make the connection and go in a directory
and I must have an error message when the user or the password is wrong
I try this but I can't get an error when the connection is not established or the user or the password is wrong.
Set WshShell = CreateObject("WScript.Shell" )
wshShell.run "ftp.exe",true
wscript.sleep 100
date_before_timestamp=Timer
WshShell.SendKeys "ftp.exe"&chr(13)
WshShell.SendKeys "open 127.0.0.1 21"&chr(13)
WshShell.SendKeys "galene"&chr(13)
WshShell.SendKeys "galene"&chr(13)
WshShell.SendKeys "cd test"&chr(13)
WshShell.SendKeys "quit"&chr(13)
WshShell.SendKeys chr(13)
date_after_timestamp=Timer
interval= date_after_timestamp - date_before_timestamp
wscript.echo interval
how i can make ?