vbscript - How to verify that all required included files exist on startup -


does still work classic asp vbscript , know if possible verify on startup included files exist? large project , requires refactoring before moving files subfolders i'd have test in place ensures includes still pointing correct files.

not i've ever tried , here's why

in classic asp can have 2 types of #include ssi directives;

  1. relative path includes, path current directory.

    <!-- #include file = "subfolder/file.asp" --> 
  2. virtual path includes, take path root of containing web application.

    <!-- #include virtual = "/toplevelfolder/subfolder/file.asp" --> 

if have enable parent paths set in web application can use ../ traverse parent folders when using #include file.

with in mind, think have minute.

first need identify #include directives using loop iterate through web application , find .asp files example , use regular expression pull out path. there complications.

  1. you have distinguish both file , virtual types of #include
  2. workout way translate both types of path, possibly using getabsolutepathname() , verify files existence.
  3. virtual includes can point virtual directories exist in iis , point physical location (doesn't have inside folder structures of web application). biggest complication in honesty.

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -