vapanchamukhi Posted February 4, 2011 Share Posted February 4, 2011 I have a requirement where i need to move files from ftp server to local server. But what i found after reading some of the topics is, we need to give the file name that we want to move from ftp server. But what is my requirement is, i will be not knowing the name of the files present in the ftp server. In Ftp server i will be having access to a folder and in that folder all the files that i need to move into my server will be residing. So please somebody help me out how can i do moving of files from ftp server without knowing the file names which are in ftp server folder.Thanks in advance. Link to comment Share on other sites More sharing options...
[dx] Posted February 4, 2011 Share Posted February 4, 2011 $handle_files = opendir("files");$dir_array = array();while (false !== ($file = readdir($handle_files))) { if($file != "." && $file != ".." &&){ $dir_array[] = $file; }}foreach($dir_array as $file_name) { echo $file_name . '<br>';} This will list files in "files" folder. Now you can try use it.Hope it helps something. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.