views:

18

answers:

1

hello guys, 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 = Split(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 ..

A: 

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.

Tom Gullen
yup buddy i has been accomplished, i did something like this but thanks to help.
Abhisheks.net