This error is usually pretty self-explanatory. You tried to access a file/folder that doesn't exist, or you tried to access a file that does exist but you specified the wrong folder. This message is also incorrectly displayed when you to try to access a text file or folder on another machine via a UNC share or mapped drive, when IUSR_ does not have access... the error message should, IMHO, be Permission Denied. See
Article #2168 for more info, if this is the situation.
Some tips on avoiding this:
- Make use of the folderExists and fileExists properties of FSO!
- Use OpenTextFile with the "Create" flag to true, instead of assuming the file already exists (or using convoluted logic to createTextFile if the file doesn't exist, and openTextFile if it does).
- When folders are in the web structure, use Server.MapPath("/virtual/") to get the local location, since this can vary on different machines (and nobody likes cleaning up hard-coded drive letters when your app moves). This is an expensive call, so you might want to store the local path of the webroot (Server.MapPath("/")) in an Application variable, instead of calling the Server.MapPath method every time you need it.