Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to transfer file in folder with ftp bu i took error. Error and code are in picture.
http://img855.imageshack.us/img855/4531/59182060.png[^]
Posted

Read here: http://msdn.microsoft.com/en-us/library/system.windows.forms.folderbrowserdialog.selectedpath.aspx[^]
Quote:
The path of the folder first selected in the dialog box or the last folder selected by the user.

You probably need a file to upload. Folder length has no meaning in this context.
 
Share this answer
 
v2
Hi,

Length property should not called for the directory. if you call FI.Length for directory it will gives you FileNotFoundException.

Refer MSDN for FileInfo.Length[^]

Thanks
-Amit Gajjar
 
Share this answer
 
Comments
Eren GENÇTÜRK 29-Aug-12 6:11am    
I understand. how can i call folder?i want to select folder and upload the file inside in this folder
AmitGajjar 29-Aug-12 6:13am    
You need to call Directory.GetFiles to get all the files from specific folder and upload one by one or you can use other bulk upload method.
Eren GENÇTÜRK 29-Aug-12 7:33am    
thanks so much.
AmitGajjar 29-Aug-12 7:33am    
Your welcome
With a FolderBrowserDialog you can select folders,
you can use a OpenFileDialog to select one or more files.
More info about OpenFileDialog:
http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx[^]
 
Share this answer
 
v2

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