Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 19th, 2007, 01:02 PM
Registered User
 
Join Date: Apr 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default FSO issue

Hi everyone,

I have a strange problem with the FolderExist function of the File System Object.

On one server I can run a script and FolderExist work as expected. However I've tried the same script on another server and FolderExist is returning false even though I know the folder is present.

The permission on the folder are set so that everyone have full access. I have searched for a while as to what might be causing this but so far I've been unsuccessfull...any ideas would be greatly appreciated.

Thanks,

--
logidude

 
Old April 19th, 2007, 06:04 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Posting some code would help

Wind is your friend
Matt
 
Old April 20th, 2007, 07:40 AM
Registered User
 
Join Date: Apr 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well it was part of a complex system but I've stripped out most logic to troubleshoot. I'm left with this:

Code:
Dim FileSys
Dim dirPath

Set FileSys = Server.CreateObject("Scripting.FileSystemObject")

dirPath= "\\computerName\wwwdocs\dir\dubdir"

Response.Write("dirPath " & dirPath & "<BR><BR>")

If FileSys.FolderExists(dirPath) Then
  Response.Write("Folder exist : " & dirPath)
Else
  Response.Write("Folder doesn't exist : " & dirPath)
End if
If I run this from one server, I get folder exist, however after copying it to another I get folder doesn't exist. Since I print the path in either case I've tried copy/paste of the output to the browser address and the folder does exist.

Kinda lost...thanks for the help.

 
Old April 23rd, 2007, 08:28 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

mmmm, makes no sense at all to me. Have you checked your case sensitivity? Since your dirPath is a string this is the most likely problem I can see

Wind is your friend
Matt
 
Old April 24th, 2007, 07:49 AM
Registered User
 
Join Date: Apr 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

They are both Windows box, so I was under the impression that case sensitivity didn't matter...but I checked and yeah the cases for the paths matches (in my script - and in the "real path")

This is really weird...I thought it would be a simple dumb mistake from my part but now this just stranger...


 
Old April 24th, 2007, 10:20 AM
Registered User
 
Join Date: Apr 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi everyone,

Well ran some more test trying to modify the path using 8.3 notation...nothing is working as far as I can tell on that server in particular. Every other asp script is working just fine though.

I've pretty much exhausted all my options. Any suggestions on what I could try to troubleshoot the issue?

I've narrowed down my code to 4 lines...so obviously it's not an issue with the coding anymore.






Similar Threads
Thread Thread Starter Forum Replies Last Post
fso error merck_04 .NET Framework 1.x 0 October 18th, 2006 05:53 AM
FSO - unstable nancy Classic ASP Databases 3 September 10th, 2004 09:52 AM
FSO mikedeepak Classic ASP Databases 5 August 4th, 2004 05:55 AM
FSO mikedeepak Classic ASP Databases 0 August 4th, 2004 12:35 AM
FSO not working (permission issue?) aware Classic ASP Professional 1 February 16th, 2004 07:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.