Here is a simple example from W3 Schools:
dim fs
strFilePath = "http://lanswinweb1/assembly/scrollingimages/images/" & Session("Num") & ".jpg"
'strFilePath = "P:\Assembly\Team Performance Boards\LDT Scrolling Monitor\" & Session("Num") & ".jpg"
set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FileExists(strFilePath) then
Session("Num") = Session("Num") + 1
response.write("File: " & strFilePath & " exists!")
else
response.write("File: " & strFilePath & " does not exist!")
end if
set fs=nothing
This is giving me:
Yet when I go to that link in the web address, it works:
So, what is it that I am missing or doing wrong?
Thank you @Lankymart for the help!
strFilePath = Server.MapPath(".") & "\images\1.jpg"
Solves it!