[Common]
Description=获取子目录列表
HotKeyStart=119
HotKeyStop=122
HotKeyPause=0
Enabled=1
RunOnce=1

[Data]


[Script]
Main:
//Your code here
  var s=""
  set s=VBSCall("GetSubFolders","c:\temp")
  do ShowMsg(s)
EndMain

vbsbegin
dim fs,SubFoldersFound
function GetSubFolders(ParentFolder)
    Set fs = CreateObject("scripting.filesystemobject")
    digui(ParentFolder)'调用递归函数进行查找
    GetSubFolders=SubFoldersFound
End Function

'下面是递归查找函数
Function digui(path)
    Set folder = fs.getfolder(path)
    Set subfolders = folder.subfolders
    'Set Files = folder.Files
    'For Each i In Files
    '    FileName=FileName & i.path & vbNewLine '找到则追加到变量FileName中
    'Next
    For Each j In subfolders
        SubFoldersFound=SubFoldersFound & j.path & vbNewLine
        digui(j.path) '递归查找子目录
    Next
End Function
vbsend
