Hi all,
FileSystemObject question...
I'm trying to check if files exist or not, but the files
are not sitting on the same server as our Intranet.
Basically we have about 5000 photos in a directory on our
database server, and they must stay there. I want to use
the FileSystemObject (running on our Intranet server) to
check if a photo is there, if so display it, if not
display a 'no image' graphic.
Within IIS I've created a virtual directory
called 'staffpics' which looks at the hidden share for the
photos: \\servername\sharename$
This works fine displaying the photos in IE:
intranet.domain.co.uk/staffpics/117495.jpg
But when I try to check if the file exists using the
FileSystemObject:
CheckThisFile = Server.MapPath("/staffpics/117495.jpg")
Set filesys = CreateObject("Scripting.FileSystemObject")
Response.Write filesys.FileExists(CheckThisFile)
I get "False", but I know the file is there and accessible.
Any help with this would be great, even if it's not using
the FileSystemObject...!
Thanks,
Steve 3 2092 http://www.aspfaq.com/2168
--
Aaron Bertrand
SQL Server MVP http://www.aspfaq.com/
"Steve" <la****@yahoo.com> wrote in message
news:0b****************************@phx.gbl... Hi all,
FileSystemObject question...
I'm trying to check if files exist or not, but the files are not sitting on the same server as our Intranet. Basically we have about 5000 photos in a directory on our database server, and they must stay there. I want to use the FileSystemObject (running on our Intranet server) to check if a photo is there, if so display it, if not display a 'no image' graphic.
Within IIS I've created a virtual directory called 'staffpics' which looks at the hidden share for the photos: \\servername\sharename$
This works fine displaying the photos in IE: intranet.domain.co.uk/staffpics/117495.jpg
But when I try to check if the file exists using the FileSystemObject:
CheckThisFile = Server.MapPath("/staffpics/117495.jpg") Set filesys = CreateObject("Scripting.FileSystemObject") Response.Write filesys.FileExists(CheckThisFile)
I get "False", but I know the file is there and accessible.
Any help with this would be great, even if it's not using the FileSystemObject...!
Thanks,
Steve
Thanks Aaron,
But I don't think I have any network access problems, I
can map a drive to the share, I can view the photos via
the virtual directory in IE, all I can't do is check if
the file (.jpg) exists using the FSO.
As I mentioned, I need to use ASP/VBScript to check if an
individual has a photo, if so display it, if not display
a 'no photo' image.
I really appreciate your help, any other ideas..?
Steve -----Original Message----- http://www.aspfaq.com/2168
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/
"Steve" <la****@yahoo.com> wrote in message news:0b****************************@phx.gbl... Hi all,
FileSystemObject question...
I'm trying to check if files exist or not, but the files are not sitting on the same server as our Intranet. Basically we have about 5000 photos in a directory on
our database server, and they must stay there. I want to use the FileSystemObject (running on our Intranet server) to check if a photo is there, if so display it, if not display a 'no image' graphic.
Within IIS I've created a virtual directory called 'staffpics' which looks at the hidden share for
the photos: \\servername\sharename$
This works fine displaying the photos in IE: intranet.domain.co.uk/staffpics/117495.jpg
But when I try to check if the file exists using the FileSystemObject:
CheckThisFile = Server.MapPath("/staffpics/117495.jpg") Set filesys = CreateObject("Scripting.FileSystemObject") Response.Write filesys.FileExists(CheckThisFile)
I get "False", but I know the file is there and
accessible. Any help with this would be great, even if it's not
using the FileSystemObject...!
Thanks,
Steve
.
> But I don't think I have any network access problems, I can map a drive to the share, I can view the photos via the virtual directory in IE, all I can't do is check if the file (.jpg) exists using the FSO.
That's because *YOU* are logged on as *YOU.* When your ASP script runs, it
runs as *IUSR*, not *YOU*. Hence, http://www.aspfaq.com/2168
Please read the article *thoroughly* before you decide it couldn't possibly
apply to you.
--
Aaron Bertrand
SQL Server MVP http://www.aspfaq.com/ As I mentioned, I need to use ASP/VBScript to check if an individual has a photo, if so display it, if not display a 'no photo' image.
I really appreciate your help, any other ideas..?
Steve
-----Original Message----- http://www.aspfaq.com/2168
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/
"Steve" <la****@yahoo.com> wrote in message news:0b****************************@phx.gbl... Hi all,
FileSystemObject question...
I'm trying to check if files exist or not, but the files are not sitting on the same server as our Intranet. Basically we have about 5000 photos in a directory on our database server, and they must stay there. I want to use the FileSystemObject (running on our Intranet server) to check if a photo is there, if so display it, if not display a 'no image' graphic.
Within IIS I've created a virtual directory called 'staffpics' which looks at the hidden share for the photos: \\servername\sharename$
This works fine displaying the photos in IE: intranet.domain.co.uk/staffpics/117495.jpg
But when I try to check if the file exists using the FileSystemObject:
CheckThisFile = Server.MapPath("/staffpics/117495.jpg") Set filesys = CreateObject("Scripting.FileSystemObject") Response.Write filesys.FileExists(CheckThisFile)
I get "False", but I know the file is there and accessible. Any help with this would be great, even if it's not using the FileSystemObject...!
Thanks,
Steve
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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:
...
|
by: Scott MacLean |
last post by:
I'm pulling my hair out over this one. I've got a web page that I need to
have write to another server across the network. The site in question does
NOT run in anonymous mode, that is, the user is...
|
by: Sean S - Perth, WA |
last post by:
Hi all,
If I create a FileSystemObject Object is it appropriate to reuse it to
perform operations on different files/folders?
Or should I create a new FileSystemObject Object for each file and...
|
by: kermit |
last post by:
I keep seeing that you can use the FileSystemObject in either VB script, or
Javascript on an aspx page.
I added a refrence to the scrrun.dll
I added importing namespaces for 'System.Object',...
|
by: Stimp |
last post by:
This is a query to do with classic ASP (written through vbscript). I
apologise in advance to posting to an ASP.NET forum, but my newsserver
doesn't have any others listed... plus it's a permissions...
|
by: G Gerard |
last post by:
Hello
I am using the FileSystemObject to copy files on a computer
Dim MyObject as Object
|
by: VancouverMike |
last post by:
Hi there,
I am writing a web app using asp.net 1.1 and C#. This web app is launched in
another win32 application and this app needs to pass information to my web
app. But this win32 application...
|
by: brigitte |
last post by:
The original problem:
I need a procedure to import a csv file created by a third party
application into an Access database. This file contains fields which
may include commas, and when they do,...
|
by: pbd22 |
last post by:
Hi -
I have code that automatically fills tabs on a page. In some cases, a
URL path won't be correct (the folder and files don't exist) and, in
these cases, I want to catch these exceptions and...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |