Finding out if any files exist in a directory

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
 
K

Kevin Spencer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top