//  home   //  advanced search   //  news   //  categories   //  sql build chart   //  downloads   //  statistics
 ASP FAQ 
Home
ASP FAQ Tutorials

   8000XXXX Errors
   Alerts
   ASP.NET 2.0
   Classic ASP 1.0
      COM / ActiveX Components
      Forms
      General Topics
      Date/Time Routines
      Email Scripts & Info
      Files/Directories & FSO
   Databases
   General Concepts
   Search Engine Optimization (SEO)

Contact Us
Site Map

Search

Web
aspfaq.com
tutorials.aspfaq.com
classicasp.aspfaq.com

ASP FAQ Tutorials :: Classic ASP 1.0 :: Files/Directories & FSO :: Why do I get 'Path not found' errors with Scripting.FileSystemObject?


Why do I get 'Path not found' errors with Scripting.FileSystemObject?

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: 
  1. Make use of the folderExists and fileExists properties of FSO! 
     
  2. 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). 
     
  3. 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.

    Related Articles

    Can I include a file in both server-side and client-side script?
    Can I read / write a user's file without a prompt?
    Can I rename a file using FileSystemObject?
    Could I get some help working with files using FileSystemObject?
    How do I avoid 'the red x' when an image is missing?
    How do I change the modified time of a file?
    How do I create / manipulate images from ASP?
    How do I dynamically include files?
    How do I find the owner, author, and other properties of a file?
    How do I get a list of a folder's subfolders?
    How do I get the name of the current URL / page?
    How do I prevent people from 'leeching' my CSS or JS files?
    How do I prevent people from 'leeching' my images?
    How do I retrieve a random file from a given folder?
    How do I send the correct filename with BinaryWrite?
    How do I sort a list of files?
    How do I use FileSystemObject to create a file on the client?
    Why do I get 'Disk not ready' errors with FileSystemObject?
    Why do I get 'Invalid procedure call or argument'?
    Why do I get 'Permission Denied' errors with FileSystemObject?
    Why do I get 800A0034 errors?
    Why do I get 800A003E / Input past end of file errors?
    Why do I get 800A0BBA errors?
    Why do I get 800A0BBC errors?
    Why do I get an 'Invalid Path Character' error?
    Why do I get permissions errors after upgrading to Windows XP?
    Why does FileSystemObject hang all of a sudden?
    Why is 'the operation completed successfully' an error message?

     

     


    Created: 1/20/2001 | Last Updated: 3/17/2005 | broken links | helpful | not helpful | statistics
    © Copyright 2006, UBR, Inc. All Rights Reserved. (307)

     

    Copyright 1999-2006, All rights reserved.
    Finding content
    Finding content.  An error has occured...