|
本帖最后由 yikang8888 于 2010-12-15 16:59 编辑
我想从FTP下载一个.bmp的图片,需要下载的文件名字根据我GUI上输入的$Input2,$Input3,$Input4来判断,那么我的路路径要怎么写呢?下面这2行,感谢了
$S_Desktop = "D98-DESKTOP\$Station\$PC_Num.bmp"
$C_Desktop = "C:\$PC_Num.bmp"
$Station = GUICtrlRead($Input2)
$Device_ID = GUICtrlRead($Input3)
$PC_Num = GUICtrlRead($Input4)
$PC_Name = $Station & "-" & $Device_ID & "-" & $PC_Num
Dim $s_ip = IniRead("ftp test.ini", "server_information", "ServerIP", "")
Dim $s_name = IniRead("ftp test.ini", "server_information", "Username", "")
Dim $s_password = IniRead("ftp test.ini", "server_information", "password", "")
$varP = Ping($s_ip, 200) ;判断网络状况是否OK,延时大于200视为fail
if $varP Then GUICtrlSetData($msg1, "网络状况良好~~~~" & @CRLF, 1)
$3ftp = _FTP_Open("myftp Control") ;打开FTP会话
$conn = _FTP_Connect($3ftp, $s_ip, $s_name, $s_password) ;连接到FTP
$huo = _FTP_DirGetCurrent($conn)
$S_Desktop = "D98-DESKTOP\$Station\$PC_Num.bmp"
$C_Desktop = "C:\$PC_Num.bmp"
Else
GUICtrlSetData($msg1, "网络有问题请检查" & @CRLF, 1)
EndIf |
评分
-
查看全部评分
|