Ftp get file names
I just tried it on one server, and got Invalid command. I stand over my comment - it may come in nice and handy for some users, depending on their specific use case. Your ftp client probably calls the command something else. Sometimes they are so "user friendly" that you can't tell what a command actually does.
This will obviously fail spectacularly if a file name contains a space. It will probably also fail if a file name contains a control character and the ftp server displays it as? Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Post as a guest Name. Join Us Close. Join Tek-Tips Forums! Join Us! By joining you are opting in to receive e-mail. Promoting, selling, recruiting, coursework and thesis posting is forbidden. Students Click Here. I am trying to figure out how to get a list of the files residing in a folder on an ftp site and put them into an Access table. I could then put them in a combo box so the user can select the file title to open and view. These files are pdfs of meeting minutes.
I also need a button which will allow the secretary to add a new pdf to the folder--this would require a browse screen. I believe I may be in over my head! Any help would be appreciated. As you can see, the Net::FTP methods are similar to the steps you'd expect to use in an interactive ftp session: the new method connects your program to the server, the login method logs your program in, and the pwd method returns the current working directory.
From here it's a simple matter to define a remote directory that we want to look at:. Then we define the glob-style pattern that determines the files that we want to list, here we are interested in seeing all files that start with the string ' ex ' :. Add a comment. Active Oldest Votes. Martin Prikryl Martin Prikryl k 47 47 gold badges silver badges bronze badges.
Can't believe it's this simple. Thank-you very much! CompareTo other. Create sourceURI ; sourceRequest. ListDirectory; sourceRequest. ReadLine ; while line! John Boling John Boling 4 4 silver badges 14 14 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook.
0コメント