LastSoul Posted February 6, 2014 Posted February 6, 2014 hey guys i want to upload file to FTp But its not Uploading i use this code : Dim $sUsername = 'xxxxxx' Dim $sPass = 'xxxxxxx' Dim $sServer = 'ftp://xxxxxxxx/' Local $hOpen = _FTP_Open('MyFTP Control') Local $hConn = _FTP_Connect($hOpen, $sServer, $sUsername, $sPass) _FTP_FilePut ( $hOpen, @DesktopDir & "1.txt" , "1.txt") _FTP_Close($hConn) _FTP_Close($hOpen) why not uploading ?
Unc3nZureD Posted February 6, 2014 Posted February 6, 2014 Try to debug which part is not working How to "debug"? You put msgboxes after each line to see if it's working: $hOpen = _FTP_Open('MyFTP Control') $hConn = _FTP_Connect($hOpen, $sServer, $sUsername, $sPass) $hPutFile = _FTP_FilePut ( $hOpen, @DesktopDir & "\1.txt" , "1.txt") MsgBox(0,"", "Open: " & $hOpen & @CRLF & "Connect: " & $hConn & @CRLF & "PutFile: " & $hPutFile) _FTP_Close($hConn) _FTP_Close($hOpen) See where it fails and try to re-think what could be the problem. I'm sure the problem will be at the FilePut part. Usually you need something like public_html1.txt.
JohnOne Posted February 6, 2014 Posted February 6, 2014 (edited) _FTP_FilePut ( $hConn, @DesktopDir & "1.txt" , "1.txt") Edited February 6, 2014 by JohnOne Unc3nZureD 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
LastSoul Posted February 6, 2014 Author Posted February 6, 2014 not work i tried with vb.net and its upload but with autoit not working why ?
Unc3nZureD Posted February 6, 2014 Posted February 6, 2014 It seems it can't even connect before uploading. Are you sure that you didn't mistype anything in yoru script? (I mean username, password, server).
JohnOne Posted February 6, 2014 Posted February 6, 2014 These threads usually turn out to be problems at remote end. Do yourself a favour and do some error checking. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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