how to count files on disk.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hiye, how do i count files e.g image file on my folder. i want do list out a list of images into small tables. but before i do that i would like to know the total file 1st. can that be done

smen
 
Yes it can be done you would use IO.Directory class

check the code below:

string[] files = System.IO.Directory.GetFiles("c:\\", "*.*");
int number = files.Length;

hope this helps

Fitim Skenderi

smen said:
hiye, how do i count files e.g image file on my folder. i want do list out
a list of images into small tables. but before i do that i would like to
know the total file 1st. can that be done?
 
Back
Top