Steveiwonder Posted April 23, 2010 Share Posted April 23, 2010 (edited) Hey All,First time using _FTP_ functions with auto it but here is what im trying to do:Bascially a very simple task. 1) Log into FTP server2) Get list of folders and display3) Create a new folder4) Repeat Step 2You may ask why? Well its intergrated into a much bigger project, this is the my issue scaled down.My problem is this.I can get the list of files and display them fine.I can create the new folderNow, when i get the list AGAIN it doesn't seem to display it with the new folder added. I have tried, inserting a huge sleep() between the call of the Listtest(). Closing the FTP conn using _FTP_Close and they starting a new one.None of the above works.However when the script terminates and is rerun it will get the list with the new folder, but again on the second call it won't show any additional folders added.Here is the code, you will need an FTP server of your own to test this.#Include <FTPEx.au3> $ftpOpen = _FTP_Open("My Test FTP") $ftpConn = _FTP_Connect($ftpOpen, "server", "user", "password") ;_FTP_DirSetCurrent($ftpConn, "htdocs") ; This is not relevant to you. ListTest() _FTP_DirCreate($ftpConn, "Test Dir") ; Create a test dir Sleep(10000) ListTest() _FTP_Close($ftpOpen) Func ListTest() local $list $list = _Ftp_ListToArray($ftpConn, 1) ; get list of folders For $o In $list ConsoleWrite($o & @CRLF) ; display folder names in console. Next EndFuncI hope it makes sense?Thanks for any help.Steve Edited April 23, 2010 by Steveiwonder They call me MrRegExpMan Link to comment Share on other sites More sharing options...
Steveiwonder Posted April 23, 2010 Author Share Posted April 23, 2010 (edited) I did the ultimate noob thing and searched the forum after i posted this. http://www.autoitscript.com/forum/index.php?showtopic=111122&st=0&p=779700&hl=_FTP_ListToArray&fromsearch=1&#entry779700 $INTERNET_FLAG_RELOAD ; forces reload Sorry all. Let the flame begin! Edited April 23, 2010 by Steveiwonder They call me MrRegExpMan 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