furtivevole
Technical User
The following is a vbscript snippet that currently sits just below the <body...> tag on an asp page.
<%
dim ProdFile
ProdFile = "C:\Program Files\Setup Files\xyz\default.asp"
dim sys
set sys = Server.CreateObject( "Scripting.FileSystemObject" )
if Sys.FileExists( ProdFile ) Then
response.write "Exists"
else
response.write ProdFile & " doesn't exist"
end if
set sys=nothing
set ProdFile=nothing
%>
The aim is to test from the server side if a particular file/folder already exists on the user's own PC, and then to take some action. The current response.write statements are just diagnostic.
This seems to be syntactically correct, but only ever comes up with "doesn't exist". The file in question is certainly present on local drive. I've tried substituting the spaces in the string with %20 (and using a simpler path) - no effect.
Any other clues?
<%
dim ProdFile
ProdFile = "C:\Program Files\Setup Files\xyz\default.asp"
dim sys
set sys = Server.CreateObject( "Scripting.FileSystemObject" )
if Sys.FileExists( ProdFile ) Then
response.write "Exists"
else
response.write ProdFile & " doesn't exist"
end if
set sys=nothing
set ProdFile=nothing
%>
The aim is to test from the server side if a particular file/folder already exists on the user's own PC, and then to take some action. The current response.write statements are just diagnostic.
This seems to be syntactically correct, but only ever comes up with "doesn't exist". The file in question is certainly present on local drive. I've tried substituting the spaces in the string with %20 (and using a simpler path) - no effect.
Any other clues?