Alex_Piggy
Advanced Member | Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору
Код: on error resume next Dim FSO, oOutfile, Dict, count Set FSO = CreateObject("Scripting.FileSystemObject") Set Dict = CreateObject("Scripting.Dictionary") For Each Drive in FSO.Drives sub_Process_Folder (FSO.GetFolder(Drive & "\")) Next Set oOutfile=FSO.OpenTextFile("extlist.txt", 2, True) For Each Data in Dict.Items oOutFile.Writeline Data Next Sub sub_Process_Folder (oFolder) Dim vExt on error resume next For Each oSubfolder in oFolder.Subfolders sub_Process_Folder (oSubfolder) For Each oFile in oSubfolder.Files vExt = Mid(oFile.Name,InStrRev(oFile.Name,".")) If Not Dict.Exists(vExt) Then Dict.Add vExt, vExt count = count + 1 Next Next End Sub |
|