Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Problem using FSO with mapped drive... (http://www.velocityreviews.com/forums/t794976-problem-using-fso-with-mapped-drive.html)

Stephen Last 06-15-2004 01:36 PM

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("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] 06-15-2004 01:41 PM

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\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" <lastie@yahoo.com> wrote in message
news:eAXJD3tUEHA.760@TK2MSFTNGP12.phx.gbl...
> 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!





All times are GMT. The time now is 12:56 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57