finding subfolder of a folder getting by getFolder method in asp
i am troubling from this problem , i want to find the list of folder but there is some problem , i have a support folder in root directory, first i have the subfolder of this "Support" folder then in each folder i have to find a specific say "x" folder and then in this x folder i want to check each file and folder. i am sending here code . please help me ....
dim fs, fso, fo, s, x, f, filePath, a, sfPath
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder(Server.MapPath("support/"))
a = Spli开发者_Python百科t(pSku,"-",-1)
for each x in fo.SubFolders
sfPath= "support/" + x.Name + "/" + a(0) + "/"
//a(0) contains a folder name
set s = fs.GetFolder(server.MapPath(sfPath))
set s = nothing
next
Please tell me solution ..
You would need to use recursion if I understand your problem correctly, if you want to scan every sub file/folder of a particular folder.
Create a function, then have the function call itself on each folder it finds.
精彩评论