Forums - C# Corner

Forum guidelines


  • 735
  • 27
  • 30.3k

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)

C# Corner Chandigarh Developer Conference


Spire.Doc - Free .NET Word API
Use Spire.Doc to create, read, write, print, and convert word documents to OpenXML, RTF, TXT, XPS, EPUB, EMF, HTML, Image and PDF.