Problem using FSO with mapped drive...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stephen Last

    Problem using FSO with mapped drive...

    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("S cripting.FileSy stemObject")
    strDriveName = "x"
    If FileSys.DriveEx ists(strDriveNa me) 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("S cripting.FileSy stemObject")
    strFolderName = "x\temp-SL-1\"
    If FileSys.FolderE xists(strFolder Name) 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]

    #2
    Re: Problem using FSO with mapped drive...

    (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\sh arename\). 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.

    --

    (Reverse address to reply.)




    "Stephen Last" <lastie@yahoo.c om> wrote in message
    news:eAXJD3tUEH A.760@TK2MSFTNG P12.phx.gbl...[color=blue]
    > 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("S cripting.FileSy stemObject")
    > strDriveName = "x"
    > If FileSys.DriveEx ists(strDriveNa me) 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("S cripting.FileSy stemObject")
    > strFolderName = "x\temp-SL-1\"
    > If FileSys.FolderE xists(strFolder Name) 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![/color]


    Comment

    • Curt_C [MVP]

      #3
      Re: Problem using FSO with mapped drive...

      x: isn't mapped for the user that IIS is running under/as

      --
      Curt Christianson
      Owner/Lead Developer, DF-Software
      Site: http://www.Darkfalz.com
      Blog: http://blog.Darkfalz.com


      "Stephen Last" <lastie@yahoo.c om> wrote in message
      news:eAXJD3tUEH A.760@TK2MSFTNG P12.phx.gbl...[color=blue]
      > 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("S cripting.FileSy stemObject")
      > strDriveName = "x"
      > If FileSys.DriveEx ists(strDriveNa me) 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("S cripting.FileSy stemObject")
      > strFolderName = "x\temp-SL-1\"
      > If FileSys.FolderE xists(strFolder Name) 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![/color]


      Comment

      Working...