Problem using FSO with mapped drive...

Discussion in 'ASP General' started by Stephen Last, Jun 15, 2004.

  1. Stephen Last

    Stephen Last Guest

    Hi all,

    I have a problem using FSO with a mapped drive.

    I have mapped x: on our Intranet server to a folder on one of our file
    servers. The folder contains user home directories. I want to be able to
    copy the contents from one home dir, to another, to allow a user of a
    temp account to transfer all their files and folders to their real
    account, all from our Intranet.

    When I use the following:

    Set FileSys = CreateObject("Scripting.FileSystemObject")
    strDriveName = "x"
    If FileSys.DriveExists(strDriveName) Then
    Response.Write strDriveName & " drive is there..."
    Else
    Response.Write strDriveName & " drive is NOT there..."
    End If
    Set FileSys = Nothing

    It tells me the drive does exist, great! But when I use:

    Set FileSys = CreateObject("Scripting.FileSystemObject")
    strFolderName = "x\temp-SL-1\"
    If FileSys.FolderExists(strFolderName) Then
    Response.Write strFolderName & " is there..."
    Else
    Response.Write strFolderName & " is NOT there..."
    End If
    Set FileSys = Nothing

    It can’t seem to see the folder, but the folder is defiantly there.
    Does FSO have a problem working with mapped drives? Can anyone help?

    Thanks,

    Steve




    *** Sent via Devdex http://www.devdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Stephen Last, Jun 15, 2004
    #1
    1. Advertising

  2. (a) should be x:\ not x\ ?

    (b) assuming IUSR is running your ASP pages, he doesn't know what x:\ is,
    since you never logged in as IUSR and created a mapping for x:\ ... so, you
    need to either change the user ASP is running as, or use a UNC path (e.g.
    \\servername\sharename\). You will still need to read through
    http://www.aspfaq.com/2168 for Machine A's IUSR_MachineA to be able to
    access MachineB's file system.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "Stephen Last" <> wrote in message
    news:...
    > Hi all,
    >
    > I have a problem using FSO with a mapped drive.
    >
    > I have mapped x: on our Intranet server to a folder on one of our file
    > servers. The folder contains user home directories. I want to be able to
    > copy the contents from one home dir, to another, to allow a user of a
    > temp account to transfer all their files and folders to their real
    > account, all from our Intranet.
    >
    > When I use the following:
    >
    > Set FileSys = CreateObject("Scripting.FileSystemObject")
    > strDriveName = "x"
    > If FileSys.DriveExists(strDriveName) Then
    > Response.Write strDriveName & " drive is there..."
    > Else
    > Response.Write strDriveName & " drive is NOT there..."
    > End If
    > Set FileSys = Nothing
    >
    > It tells me the drive does exist, great! But when I use:
    >
    > Set FileSys = CreateObject("Scripting.FileSystemObject")
    > strFolderName = "x\temp-SL-1\"
    > If FileSys.FolderExists(strFolderName) Then
    > Response.Write strFolderName & " is there..."
    > Else
    > Response.Write strFolderName & " is NOT there..."
    > End If
    > Set FileSys = Nothing
    >
    > It can't seem to see the folder, but the folder is defiantly there.
    > Does FSO have a problem working with mapped drives? Can anyone help?
    >
    > Thanks,
    >
    > Steve
    >
    >
    >
    >
    > *** Sent via Devdex http://www.devdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Aaron [SQL Server MVP], Jun 15, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shailesh
    Replies:
    1
    Views:
    851
    Tim Golden
    Mar 28, 2007
  2. Mrunal

    Accessing ClearCase Mapped Drive using ASP.NET

    Mrunal, Nov 16, 2004, in forum: ASP .Net Security
    Replies:
    1
    Views:
    174
    Ken Schaefer
    Nov 16, 2004
  3. Sriram Mallajyosula

    Error while running a virtual site by using a mapped drive

    Sriram Mallajyosula, Jan 30, 2007, in forum: ASP .Net Security
    Replies:
    6
    Views:
    168
    Steven Cheng[MSFT]
    Feb 5, 2007
  4. gil

    Mapped drives and FSO

    gil, Aug 16, 2004, in forum: ASP General
    Replies:
    3
    Views:
    150
    Aaron [SQL Server MVP]
    Aug 16, 2004
  5. king
    Replies:
    1
    Views:
    311
Loading...

Share This Page