Zask3333 Posted March 31, 2016 Posted March 31, 2016 Hello i'm trying to send a file named (file.log) in the temp folder to my ftp server but i cant get it to work, im not well known with the language autoit so it would be herry helpful if i can have some help to find the solution to my problem. I have a error that displays this. ............................................................... . Line 22 (File "C:\Users\Jacob\AppData\Local\Temp\ftp.au3"): . . . . $Open = _FTPOpen("anything") . . $Open = ^ ERROR . . . . Error: Unknown function name. . ............................................................... This is my code ~ ........................................................................................................... #include-once <FTP.au3> $server = "" $username = "" $pass = "" $sLocalFile = @TempDir & "\file.log" $sRemoteFile = "/htdocs/upload/file.log" ;Local Const $INTERNET_FLAG_PASSIVE = 0x08000000 ;Local Const $INTERNET_FLAG_TRANSFER_ASCII = 0x00000001 ;Local Const $INTERNET_FLAG_TRANSFER_BINARY = 0x00000002 Local Const $WININET_API_FLAG_SYNC = 0x00000004 $Open = _FTPOpen("anything") If Not FileExists( $sLocalFile ) Then MsgBox( 16 , "ERROR" , "File doesn't exist!" ) Exit EndIf If @error Or Not $Open Then ConsoleWrite( "Error(" & @error & ") > Unable to initialize FTP.au3" & @LF ) Exit EndIf $Conn = _FTPConnect($Open, $server, $username, $pass );$INTERNET_FLAG_PASSIVE If @error Or Not $Conn Then ConsoleWrite( "Error(" & @error & ") > Unable to establish the connection to "&$server & @LF ) Exit EndIf $Ftpp = _FtpPutFile($Conn, $sLocalFile , $sRemoteFile );$WININET_API_FLAG_SYNC If $Ftpp == 1 Then ConsoleWrite( "Transfer successful!" & @LF ) Exit EndIf $Ftpc = _FTPClose($Open) ........................................................................................................... Anyone know what the problem is? Thanks.
Zask3333 Posted March 31, 2016 Author Posted March 31, 2016 I found this code online so i only have a slight understanding of what it does
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now