Forums - C# Corner

Forum guidelines


  • 1.4k
  • 39
  • 36.1k

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)