ASP多级/多层目录/文件夹拆分/分割/截取,ASP多级目录拆分,ASP多级目录分割,ASP多级目录截取,ASP多级文件夹拆分,ASP多级文件夹分割,ASP多级文件夹截取,ASP多级路径拆分,ASP多级路径分割,ASP多级路径截取,ASP多层目录拆分,ASP多层目录分割,ASP多层目录截取,ASP多层文件夹拆分,ASP多层文件夹分割,ASP多层文件夹截取,ASP多层路径拆分,ASP多层路径分割,ASP多层路径截取。

ASP多级/多层目录拆分/分割/截取:

<%
A = "C:\Program Files\小旋风AspWebServer\wwwroot\test1\test2\test3\test4\a.txt"

For each Tmp in Split(Left(A, InStrRev(A, "\")), "\")
    IF Len(Tmp)>0 Then
        Tmp = Tmp & "\"
        Tmp1 = Tmp1 & Tmp
        Response.Write Tmp1 & "<br>"
    End IF
Next
%>

ASP多级/多层目录拆分/分割/截取输出结果格式:

C:\
C:\Program Files\
C:\Program Files\小旋风AspWebServer\
C:\Program Files\小旋风AspWebServer\wwwroot\
C:\Program Files\小旋风AspWebServer\wwwroot\test1\
C:\Program Files\小旋风AspWebServer\wwwroot\test1\test2\
C:\Program Files\小旋风AspWebServer\wwwroot\test1\test2\test3\
C:\Program Files\小旋风AspWebServer\wwwroot\test1\test2\test3\test4\