Click here to Skip to main content
Sign Up to vote bad
good
See more: C#fileFTP
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 28 Aug '12 - 23:45


3 solutions

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.
  Permalink  
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
  Permalink  
Comments
Eren GENÇTÜRK - 29 Aug '12 - 6:11
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:13
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:33
thanks so much.
@amitgajjar - 29 Aug '12 - 7:33
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[^]
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 464
1 Mahesh Bailwal 373
2 Maciej Los 215
3 CPallini 175
4 Aarti Meswania 173
0 Sergey Alexandrovich Kryukov 9,417
1 OriginalGriff 7,204
2 CPallini 3,933
3 Rohan Leuva 3,211
4 Maciej Los 2,743


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 29 Aug 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid