Unc3nZureD Posted July 19, 2011 Share Posted July 19, 2011 (edited) I tried to make a little FTP script but I failed at _FTP_FileGet() :S What is the proper use of this command? What did i wrong? My code: #Include <FTPEx.au3> $Open = _FTP_Open('TheDuelRPG') $Connect = _FTP_Connect($Open, "theduelrpg.clanteam.com", "theduelrpg_clanteam", "Publicpassword") $FileGet = _FTP_FileGet($Connect, "index.html", @ScriptDir & "\index.html") $Close = _FTP_Close($Open) msgbox(0,"","DONE" & @CRLF & " " & @CRLF & $Open & @CRLF & $Connect & @CRLF & $FileGet & @CRLF & $Close) FileGet = 0 Others: Successful Please help me. Edited July 19, 2011 by Unc3nZureD Link to comment Share on other sites More sharing options...
Tripredacus Posted July 19, 2011 Share Posted July 19, 2011 You are sure that index.html is in the default dir once you log in? Some FTPs will put you in a root where you need to CD into the main account dir. Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
GMK Posted July 19, 2011 Share Posted July 19, 2011 Your script works fine for me. You might also check your firewalls to make sure it's not blocking the FTP processes. Link to comment Share on other sites More sharing options...
Unc3nZureD Posted July 19, 2011 Author Share Posted July 19, 2011 Your script works fine for me. You might also check your firewalls to make sure it's not blocking the FTP processes.is that possible that my firewall blocks autoit but it doesn't block FileZilla? Because it works for me too in filezilla. Link to comment Share on other sites More sharing options...
smartee Posted July 19, 2011 Share Posted July 19, 2011 Your script worked fine for me too, Try this version, post your Debug.log if it doesn't work #include <FTPEx.au3> #include <Date.au3> $sPath = @ScriptDir & "\Debug.log" FileWriteLine($sPath, "Session Start: " & _NowCalc()) $Open = _FTP_Open('TheDuelRPG') FileWriteLine($sPath, "_FTP_Open returned " & $Open & " @error:" & @error) $Connect = _FTP_Connect($Open, "theduelrpg.clanteam.com", "theduelrpg_clanteam", "Publicpassword") FileWriteLine($sPath, "_FTP_Connect returned " & $Connect & " @error:" & @error) $Exists = FileExists(@ScriptDir & "\index.html") FileWriteLine($sPath, "FileExists returned " & $Exists & " @error:" & @error) If $Exists Then $Deleted = FileDelete(@ScriptDir & "\index.html") FileWriteLine($sPath, "FileDelete returned " & $Deleted & " @error:" & @error) EndIf $FileGet = _FTP_FileGet($Connect, "index.html", @ScriptDir & "\index.html") FileWriteLine($sPath, "_FTP_FileGet returned " & $FileGet & " @error:" & @error) $Close = _FTP_Close($Open) FileWriteLine($sPath, "_FTP_Close returned " & $Close & " @error:" & @error) FileWriteLine($sPath, "Session End: " & _NowCalc()) FileWriteLine($sPath, "") Link to comment Share on other sites More sharing options...
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