Click here to Skip to main content
15,921,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can any one tell me how to upload a directory and its sub directories on server uisng ftp, i can upload a FILE but what about folders??
Posted

 
Share this answer
 
v2
You will need to navigate the folder structure, creating directories on the remote server where necessary, and upload each file individually.
 
Share this answer
 
Hi,
You need to get the filestructure using below code


C#
string[] dirs=Directory.GetDirectories(path, "*.*", SearchOption.AllDirectories);


And using foreach u have to create all the directories which in that array "dirs"

then u can copy the files
All the best
 
Share this answer
 
Comments
savp 13-Oct-11 2:58am    
okay thanks, this is surely gona work, but still do u have any readymade library or class on c#???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900