Click here to Skip to main content
13,089,818 members (45,094 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I need to get file name and file size in single request.Pls tell me how to do that? i am getting only file name.
Posted 31-Mar-13 22:04pm
Prasad Khandekar 1-Apr-13 7:32am
Use LIST command, the response includes the file name and size and more.
Right. I provided more detailed answer, please see.
Sandeep Mewara 1-Apr-13 11:45am
And what have you tried so far?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can use the class System.Net.FtpWebRequest:[^].

Look at all the request methods you can issue:[^].

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

WebRequestMethods.Ftp.GetFileSize fails with error 550: SIZE not allowed in ASCII mode.

Apparently there is no way to make the FtpWebRequest to send the TYPE I command before the SIZE.[^]

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 8 Jul 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100