Altor Posted December 10, 2014 Share Posted December 10, 2014 Hi: I have a little problem with this command. I have a FTP server with a root directory and a FILES directory and i want a list of files into the FILES directory. The script work well for a root directory but when i wont to force to go to FILES directory whith the _FTP_Command this no change the directory and the function return 0. I would be very grateful if someone could give me some solution. Thank's Altor #include <FTPEx.au3> #include <Array.au3> Local $server = "" Local $usuari = "" Local $password ="" Local $Open = _FTP_Open("My connection") Local $Conn = _FTP_Connect($Open, $server, $usuari, $password,0) $FTP_dir =_FTP_Command($Conn,"cd FILES") Local $aFile = _FTP_ListToArray($Conn, 0) _ArrayDisplay($aFile, "Dir") Local $iFtpc = _FTP_Close($Conn) Local $iFtpo = _FTP_Close($Open) Link to comment Share on other sites More sharing options...
MikahS Posted December 10, 2014 Share Posted December 10, 2014 (edited) So the dir structure is definitely Server Root -> FILES -> listed files ? EDIT: Also, welcome to the AutoIt forum! Edited December 10, 2014 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Altor Posted December 10, 2014 Author Share Posted December 10, 2014 Ok Breathe, thank you very much for your reply. The server root directory have same files and folders and the script work fine working in a root server directory. If i execute a cmd ftp client of windows work well. ftp ......... user ....... pass....... ls cd FILES ls For security disable windows firewall for if the active or passive mode were the problem. I don't know if i apply well the _FTP_Command for change the directory or i need other command for it Thank's Link to comment Share on other sites More sharing options...
Solution Altor Posted December 11, 2014 Author Solution Share Posted December 11, 2014 Hi Problem solved. I need to use a raw FTP commands _FTP_Command($Conn,"CWD FILES") is the right code 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