与服务器的连接问题如下:
C:\Temp\ATS>"C:\Program Files (x86)\WinSCP\WinSCP.com"
winscp> open ftp://root:root@10.1.0.119
Connecting to 10.1.0.119 ...
Connection failed.
No connection could be made because the target machine actively refused it.
Connection failed.
winscp>
我必须连接到15台这样的服务器并收集一些流量数据。我应该能够标记那些在尝试连接时出现错误的代码。我该如何从脚本中做到这一点。我的批处理脚本包含:
"C:\Program Files (x86)\WinSCP\WinSCP.com" /script=C:\Temp\ATS\get5024.txt
,get5024.txt的内容为:
open ftp://root:root@10.1.0.119
bin
cd /opt/logs
lcd C:\Temp\ATS\
get TRAF_*.dat
exit