473,394 Members | 1,703 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,394 software developers and data experts.

FileSystemObject does not see folder on network

I'm on an Intranet, and our Intranet server is on the same domain as the
users. I have one place where I wanted to create a clickable link which
would take the user to the directory for that Ticket. So if you're on the
page for Ticket 1000, the word "Files" is surrounded by this:
<a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>

This works fine if the directory exists. (Not every ticket has a
corresponding folder). But if it doesn't exist, users who click the link
will get an empty window.

This is not the end of the world, but it would be nice to have the page see
if the folder exists, and if not, don't have the link.

In my testing of the FileSystemObject, using the "FolderExists", it works
fine on my machine. But not when it's on anohter machine. I have tried it
using the above naming convention, and also with the dirve letter that
everyone has mapped to this folder, and neither way works.

I went to ASPFAQ.com, but didn't find anything that addresses this
situation.
Jul 19 '05 #1
7 6773
Set your security to use Integrated authentication then your user's identity
will be used to check if the file exists rather than the local (to the
webserver) account of IUSR_machinename which, of course, has no rights to
\\servername\tickerts\1000
"middletree" <mi********@htomail.com> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl...
I'm on an Intranet, and our Intranet server is on the same domain as the
users. I have one place where I wanted to create a clickable link which
would take the user to the directory for that Ticket. So if you're on the
page for Ticket 1000, the word "Files" is surrounded by this:
<a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>

This works fine if the directory exists. (Not every ticket has a
corresponding folder). But if it doesn't exist, users who click the link
will get an empty window.

This is not the end of the world, but it would be nice to have the page see if the folder exists, and if not, don't have the link.

In my testing of the FileSystemObject, using the "FolderExists", it works
fine on my machine. But not when it's on anohter machine. I have tried it
using the above naming convention, and also with the dirve letter that
everyone has mapped to this folder, and neither way works.

I went to ASPFAQ.com, but didn't find anything that addresses this
situation.

Jul 19 '05 #2
Below is the folder exists function I use...... might be worth a try?

If ReportFolderStatus(Server.MapPath("users" & "\" & strName)) = "1" Then
'Folder exists...... do something
Else
'Folder doesn't exist..... do something else
End If

Function ReportFolderStatus(fldr)
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FolderExists(fldr)) Then
msg = "1" 'True
Else
msg = "0" 'False
End If
ReportFolderStatus = msg
End Function

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
middletree <mi********@htomail.com> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl...
I'm on an Intranet, and our Intranet server is on the same domain as the
users. I have one place where I wanted to create a clickable link which
would take the user to the directory for that Ticket. So if you're on the
page for Ticket 1000, the word "Files" is surrounded by this:
<a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>

This works fine if the directory exists. (Not every ticket has a
corresponding folder). But if it doesn't exist, users who click the link
will get an empty window.

This is not the end of the world, but it would be nice to have the page see if the folder exists, and if not, don't have the link.

In my testing of the FileSystemObject, using the "FolderExists", it works
fine on my machine. But not when it's on anohter machine. I have tried it
using the above naming convention, and also with the dirve letter that
everyone has mapped to this folder, and neither way works.

I went to ASPFAQ.com, but didn't find anything that addresses this
situation.

Jul 19 '05 #3
www.aspfaq.com/2168

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"middletree" <mi********@htomail.com> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl...
I'm on an Intranet, and our Intranet server is on the same domain as the
users. I have one place where I wanted to create a clickable link which
would take the user to the directory for that Ticket. So if you're on the
page for Ticket 1000, the word "Files" is surrounded by this:
<a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>

This works fine if the directory exists. (Not every ticket has a
corresponding folder). But if it doesn't exist, users who click the link
will get an empty window.

This is not the end of the world, but it would be nice to have the page see if the folder exists, and if not, don't have the link.

In my testing of the FileSystemObject, using the "FolderExists", it works
fine on my machine. But not when it's on anohter machine. I have tried it
using the above naming convention, and also with the dirve letter that
everyone has mapped to this folder, and neither way works.

I went to ASPFAQ.com, but didn't find anything that addresses this
situation.

Jul 19 '05 #4
That's the article I had already been to before making this post.

thanks
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:O9**************@TK2MSFTNGP09.phx.gbl...
www.aspfaq.com/2168

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"middletree" <mi********@htomail.com> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl...
I'm on an Intranet, and our Intranet server is on the same domain as the
users. I have one place where I wanted to create a clickable link which
would take the user to the directory for that Ticket. So if you're on the page for Ticket 1000, the word "Files" is surrounded by this:
<a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>

This works fine if the directory exists. (Not every ticket has a
corresponding folder). But if it doesn't exist, users who click the link will get an empty window.

This is not the end of the world, but it would be nice to have the page

see
if the folder exists, and if not, don't have the link.

In my testing of the FileSystemObject, using the "FolderExists", it works fine on my machine. But not when it's on anohter machine. I have tried it using the above naming convention, and also with the dirve letter that
everyone has mapped to this folder, and neither way works.

I went to ASPFAQ.com, but didn't find anything that addresses this
situation.


Jul 19 '05 #5
Thanks everyone. Turned out to be a setting on IIS.
"middletree" <mi********@htomail.com> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl...
I'm on an Intranet, and our Intranet server is on the same domain as the
users. I have one place where I wanted to create a clickable link which
would take the user to the directory for that Ticket. So if you're on the
page for Ticket 1000, the word "Files" is surrounded by this:
<a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>

This works fine if the directory exists. (Not every ticket has a
corresponding folder). But if it doesn't exist, users who click the link
will get an empty window.

This is not the end of the world, but it would be nice to have the page see if the folder exists, and if not, don't have the link.

In my testing of the FileSystemObject, using the "FolderExists", it works
fine on my machine. But not when it's on anohter machine. I have tried it
using the above naming convention, and also with the dirve letter that
everyone has mapped to this folder, and neither way works.

I went to ASPFAQ.com, but didn't find anything that addresses this
situation.

Jul 19 '05 #6
And, what part of the article did you implement? On the system where the
share is physically hosted, you created an account with IUSR_machinename
(for the machinename where this doesn't work), synchronized the passwords on
both the hosting machine and the machine that is trying to access it, and it
still doesn't work? What does "doesn't work" mean? Do you get an error
message? If so, what is it? Without knowing what "neither way works"
means... and of course, whether or not you actually implemented the
suggestion in the link I sent, we would not be able to determine what is
wrong, never mind how to fix it.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"middletree" <mi********@htomail.com> wrote in message
news:u#*************@TK2MSFTNGP11.phx.gbl...
That's the article I had already been to before making this post.

Jul 19 '05 #7
Well, I didn't think it was incumbent upon me to list every step I did in
trying to solve this, but here goes:

In the article referenced, the first section is titled "If the file is
outside your LAN"
so we can rule that out.

The next section is for those who have files inside the LAN. The first line,
about using Windows Authentication, does apply to me, so I click that, and I
get a MS KB article which says what to do if you get any of a list of
errors, but I wasn't getting any. I was just getting that the folder doesn't
exist, even if it does.

Back to the article: I can rule out Novell, and the virtual server stuff. I
stop at this point and make my post.

I then go into IIS and see that on one machine, I have Integrated Windows
Authentication checked, and on the one where I was having the problem, it
wasn't. So I checked it and all is fine.

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl...
And, what part of the article did you implement? On the system where the
share is physically hosted, you created an account with IUSR_machinename
(for the machinename where this doesn't work), synchronized the passwords on both the hosting machine and the machine that is trying to access it, and it still doesn't work? What does "doesn't work" mean? Do you get an error
message? If so, what is it? Without knowing what "neither way works"
means... and of course, whether or not you actually implemented the
suggestion in the link I sent, we would not be able to determine what is
wrong, never mind how to fix it.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"middletree" <mi********@htomail.com> wrote in message
news:u#*************@TK2MSFTNGP11.phx.gbl...
That's the article I had already been to before making this post.


Jul 19 '05 #8

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

Similar topics

0
by: Marcelo Rizzo | last post by:
I am trying to get the name of a file with a specific extension (tmw) from several different directories. The problem I am having is that the program stops working on the second pass with an run...
5
by: John Dewbert | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** Hello, I have trouble passing a folder object (from a FileSystemObject) to a sub procedure. Consider the following code: ...
4
by: StumpY | last post by:
Hi I am trying to append information collected from a form into a text file (already created and currently in the root of my web) on my ISP's webserver. The code snippet causing the problem is;...
10
by: Mayolo Juarez via DotNetMonster.com | last post by:
Ok i need to copy a directory example: copyfolder(\\com1\tr,d:\df\res,true) if i copy this directory mi app dont copy but if i copy that: copyfolder(\\com1\tr\tr1,d:\df\res,true) the copy...
5
by: Josh Rolfe | last post by:
I have a page in classic asp that accces a network drive, The code is as follows: <% dim fso dim objFolder set fso=server.createObject("Scripting.FileSystemObject") set...
2
by: bteclt | last post by:
Can the Filesystemobject be used to manipulate files or folders on either a shared drive or on a virtual directory on the web server. I had a model that worked well in ASP but when I moved to...
1
by: Sbroeff | last post by:
I would use the Scripting.FileSystemObject to find a file in a server, which I connect with a VPN connection. I'm not sure that the Scripting.FileSystemObject works with a folder, which is in...
3
by: =?Utf-8?B?VG9kZA==?= | last post by:
trying to access files located on another server within the network. the folder is shared out and we created a virtual directory as well. The error is Microsoft VBScript runtime error '800a004c'...
12
lee123
by: lee123 | last post by:
why is this so hard to do. i have alot of books that have exaples of how to do these things but when i try the exaples they never work i have a previous post on "copying files" some of the other guys...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.