I have an ASP application that runs on our company intranet. The script checks a folder structure within a network share and, if it contains any files, provides the user a link to the directory. My problem is that this only works for the users who have write permission for the network folder. The bit of code that is returning erroneous results is: