Finding out if any files exist in a directory

  • Thread starter Thread starter Anita C
  • Start date Start date
A

Anita C

Hi,
What code do I use to find out if any files exist in a particular directory,
using the Directory /File object ?
Thanks
 
The Directory Class has a shared method called GetFiles() that returns an
array of the file names in the directory. If the length of the array is 0,
there are no files.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
Back
Top