Func GetFTPfile($updatepath,$ftppath,$file_name) ; $updatepath @AppDataCommonDir&"\Net\" ; $ftppath = "/" & $shopname & "/" ; $file_name = "version.txt" Local $Open = _FTP_Open('MyFTP') Local $Conn = _FTP_Connect($Open, $ftpserver, $ftpuser, $pass) If $Conn == 0 Then MsgBox(64, "ERROR, Line "&@ScriptLineNumber, "Error code: " & @error &@LF& "Extended code: " & @extended &@LF& $ftpserver &@LF& $ftpuser &@LF& $ftppath&$file_name &@LF& $updatepath&$file_name &@LF&@LF&"INLOGGNINGSFEL server/user/psw" ) Else Local $Ftpg = _FTP_FileGet($Conn, $ftppath&$file_name , $updatepath&$file_name) ;; [, $fFailIfExists = False, [$dwFlagsAndAttributes = 0 [, $l_Flags = 0 [, $l_Context = 0]]]]) If $Ftpg == 0 Then MsgBox(64, "ERROR, Line "&@ScriptLineNumber, "Error code: " & @error &@LF& "Extended code: " & @extended &@LF& $ftpserver &@LF& $ftpuser &@LF& $ftppath&$file_name &@LF& $updatepath&$file_name &@LF&@LF&"FEL I FILNAMN eller HÄMTNINGEN") EndIf EndIf Local $Ftpd = _FTP_Close($Open) EndFunc ;===>GetFTPfile