[thelist] With ASP's FileSystem Object, tell if directory is empty.

Ken Kogler ken.kogler at cph.org
Tue Jul 23 09:26:00 CDT 2002

> I've got the code below which lists all the
> files in a directory.  What I don't know how
> to do is if the directory is empty, to simply
> say no files were found.  I'm puzzled (doesn't
> take much :) ).

if not fname.files then
end if

'this would also work:

if fname.files = "" then
end if

Either one of those should work for you... some of the other ASP folks on
here might be able to tell you which is better, though...


More information about the thelist mailing list