ASP
Here you can find some FREE usefull Classic ASP / VBScript code snippets, class modules, etc.
Function FolderExists(String)Boolean
Check if a local folder exists.
Example
<% if FolderExists("C:\inetpub\www\myfolder") then response.write "My folder DOES exist on this server!" else response.write "Cannot find my folder here..." end if %> Source Code <%
Function FolderExists(foldername) dim fso, folderpath if mid(foldername,2,1)<>":" and left(foldername,2)<>"\\" then folderpath = Server.MapPath(foldername) else folderpath = foldername set fso = CreateObject("Scripting.FileSystemObject") FolderExists = fso.FolderExists(folderpath) set fso = nothing End Function %> |