473,326 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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!
Jul 19 '05 #1
2 2414
(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" <la****@yahoo.com> wrote in message
news:eA*************@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!

Jul 19 '05 #2
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" <la****@yahoo.com> wrote in message
news:eA*************@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!

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Read Roberts | last post by:
I wrote my own directory browser in order to get around a bug where tkFileDialog.askdirectory() can't handle non-ascii paths. However, I have a problem where I call os.listdir() on a mapped...
6
by: Eran Kampf | last post by:
I am trying to dynamically create directories in my ASP.NET application (I am using Server.MapPath("/")+"test" as the folder) and I am getting a DirectoryNotFoundException saying "Could not find a...
5
by: Nirosh | last post by:
Hi All, Can any one suggest me a best way to do this .. I have a thrid party tool "EXE" that we need to use with our web service to manipulate some complex XML files, which reside in a...
2
by: Peter O'Reilly | last post by:
I am experiencing difficulty access a mapped network drive in an ASP.NET application. While using the .Net framework v 1.1 implementation of System.IO.Directory.Exists(), it fails to recognize a...
6
by: Page Horton | last post by:
I have a ASP.NET (VB) web application running. The DTS package is suppose to generates a flat file to a file path (aka: \\myStation\outputFiles\). When it runs it generates the following error on...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
2
by: createdbyx | last post by:
I am trying to make a file sync utillity to sync files between my laptop and my desktop pc. On my desktop machine (xp pro sp2) I have shared my "Visual Studio Projects" folder using windows simple...
17
by: djmob | last post by:
I am very new to .NET and Windows programming in general so please bare with me... I created a Windows service by deriving a class from ServiceBase and installing it via the 'sc create' ...
5
by: Marc | last post by:
I am trying to run a web service that has pre-compiled dll's that reference dll's that are on a mapped drive. The web service can not load because it does not see that mapped drive and returns an...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.