Answered Copying an entire directory to an FTP server

Joshdbr

Well-known member
Joined
Apr 7, 2011
Messages
211
Location
Montana, USA
Programming Experience
5-10
Hi,Does anyone here know of a way to copy an entire directory (with sub-folders and files) to an FTP server? The WebClient and FTPWebRequest classes didn't seem to work, is there another way or am I missing something?Thanks-Josh
 
Last edited:

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,295
Location
Sydney, Australia
Programming Experience
10+
All you can do is upload a single file. If you want to upload an entire folder then you need to write your own recursive method that will traverse your local folder tree, creating a remote folder if required and then uploading the files in the folder one by one.
 

Joshdbr

Well-known member
Joined
Apr 7, 2011
Messages
211
Location
Montana, USA
Programming Experience
5-10
Thanks, I guess I will have to write my own method. I would have thought there was a built in one, but I guess not!
 
Top Bottom