Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

File Count using SPFile Object

$
0
0

Hi,

I am trying to get the file count using through SPFile within the selected dates of date time controls as below.

But not able to get the count of the files in the folder as there is not count property in the SPFile object.

Please share your ideas/thoughts on the same.


                                foreach (SPFile file in oFolder.Files)
                                {                                    
                                  

                                    if ((file.TimeCreated > dtFromDate.SelectedDate) &&( file.TimeCreated<dtToDate.SelectedDate))
                                    {
                                        int filecount;                                    
                                        
                                        
                                    }

                                }

Regards,Sudheer


Thanks & Regards, Sudheer


Viewing all articles
Browse latest Browse all 11571

Trending Articles