Hi everyone,
I know you'll think this one is easy, but as a basic user of VBScript I'm stumped!
I'm writing a very simple ASP app containing a form where the user selects a local file to be uploaded to a specific folder on a remote server (not mine, I have no control over the server).
The target folder is inside the folder containing the scripts - i.e. www/Uploads.
For the path I'm using "/Uploads/", and I'm using the standard fso.FolderExists(path) to check it's existence first - and this is where it throws the error.
I'm using this:
Dim fso, uploadsDirVar
uploadsDirVar = "\uploads\"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If not fso.FolderExists(uploadsDirVar) then
Response.write uploadsDirVar & " does not exist!"
End if
And yet - I can FTP to the target folder OK (using Core FTP Lite), and I can run a simple test html file from that folder - so it DOES exist!
I've think I've tried all possible ways of specifying the path but with no success. Can anyone put me straight please...?
I'm viewing with IE11 with W7
Thanks,
I know you'll think this one is easy, but as a basic user of VBScript I'm stumped!
I'm writing a very simple ASP app containing a form where the user selects a local file to be uploaded to a specific folder on a remote server (not mine, I have no control over the server).
The target folder is inside the folder containing the scripts - i.e. www/Uploads.
For the path I'm using "/Uploads/", and I'm using the standard fso.FolderExists(path) to check it's existence first - and this is where it throws the error.
I'm using this:
Dim fso, uploadsDirVar
uploadsDirVar = "\uploads\"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If not fso.FolderExists(uploadsDirVar) then
Response.write uploadsDirVar & " does not exist!"
End if
And yet - I can FTP to the target folder OK (using Core FTP Lite), and I can run a simple test html file from that folder - so it DOES exist!
I've think I've tried all possible ways of specifying the path but with no success. Can anyone put me straight please...?
I'm viewing with IE11 with W7
Thanks,