[thelist] ASP: FileSystemObject.FileExists

Joshua Olson joshua at waetech.com
Wed Apr 14 16:26:40 CDT 2004


> -----Original Message-----
> From: Casey Crookston
> Sent: Wednesday, April 14, 2004 5:08 PM
>
> I'm trying to use FileSystemObjects to see if a picture exists.  If it
> does... show it.  If not, show a "Picture not available" pic.
> But, even if
> the pic DOES exist my script seem seems to think it doesn't.
>
> What am I doing wrong?

Casey,

FileExists is expecting the full path to the file on the HD, ie
C:\whatever\whenever\filename.txt

You passed it a URL, and it cannot handle this.

To find the full path given the relative filename, look at using
Server.MapPath(relativefile)

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168




More information about the thelist mailing list