|
|
|
|
|
| | |
|
Active Server Pages ASP control controls class classes module script Scripts applet CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Checking if file exists -- whats wrong with this? |
From: |
Charles Haven |
Date: |
5/24/2000 5:37:13 PM |
IP: |
207.144.165.177 |
I want to check for existence of a file and set a flag. When the following code is executed and I display the values of MSG1 and sFile I get MSG1 = 0 -- which is incorrect and sFile = \\server\share\Readme.txt -- which is correct. The variable MSG1 should be 1 now meaning it found the file. I did check and the file exists in the location returned by sFile.
What am I doing wrong?
TIA,
Charles
<%
Check for FS Access
MSG1=0
sPath="/fshift/Readme.txt"
sFile=Server.MapPath(sPath)
Set FS1=Server.CreateObject "Scripting.FileSystemObject")
if FS1.FileExists(sFile) THEN
Set MSG1 flag to print message
MSG1=1
end if
%> |
Follow Up - Re: Checking if file exists -- whats wrong with this? - Charles Haven 5/24/2000 5:40:08 PM
Follow Up - Re: Checking if file exists -- whats wrong with this? - Charles 5/26/2000 5:08:43 PM
|
|
|
|
|
|
|
|
|
|
|
|