Forums - C# Corner

Forum guidelines


  • 1.3k
  • 39
  • 33.4k

How can we tackle .Net GetFiles() method performance problem

Apr 1 2013 10:24 AM
My Dear Techies,
  I have a GetFiles() method in my windows application. In this method when am sending directory path it is reading all files in that directory it is working fine.
Here my question is if i have 100 or 1000 files in that folder (i.e collection of txt,jpg,tiff ...files in a directory) i didnt find any performance problem. But in real time if my directory contains 1lakh or more file i found that my process very slow how can we tackle this issue.
I have used threads , multitasking so on.
 Here my requirement is i have to copy the files collectively (i.e combination of tiff jpg,text, on)
plz help me out

How to write getfiles() method to fetch only few (100 or 1000... ) files from a directory .
Please provide the solution ........:)

Answers (1)

File APIs for .NET – 25% off Aspose.Total
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more! Use coupon code HOL2016PSB