|
' **********************************************
' tH_ΰΜtH_πSΔρ
' **********************************************
Dim Buff()
Dim Shell,Fs,obj,objSub,i,nCnt
' **********************************************
' ϊ»Φ
' **********************************************
Function InitBuff()
Redim Buff(0)
End Function
' **********************************************
' ZbgΦ
' **********************************************
Function SetBuff(strValue)
if IsEmpty( Buff(0) ) then
Buff(0) = strValue
else
ReDim Preserve Buff(Ubound(Buff)+1)
Buff(Ubound(Buff)) = strValue
end if
End Function
InitBuff
' **********************************************
' tH_Iπ
' **********************************************
Set Shell = CreateObject( "Shell.Application" )
Set obj = Shell.BrowseForFolder( 0, "tH_Iπ", 0, 0 )
if not obj is nothing then
SetBuff obj.Items().Item().Path
else
Set obj = Nothing
Set Shell = Nothing
Wscript.Quit
end if
Set obj = Nothing
Set Shell = Nothing
' **********************************************
' ρ
' **********************************************
Set Fs = CreateObject( "Scripting.FileSystemObject" )
nCnt = 0
i = 0
Do While i <= nCnt
Set obj = Fs.GetFolder(Buff(i))
on error resume next
For Each objSub in obj.SubFolders
if Err.Number = 0 then
Err.Clear
SetBuff objSub.Path
nCnt = nCnt + 1
end if
Next
on error goto 0
Set obj = Nothing
i = i + 1
Loop
Set Fs = Nothing
' **********************************************
' ΚoΝ
' **********************************************
Wscript.Echo Join( Buff, vbCrLf )
| |