Set args = WScript.Arguments Set Fs = WScript.CreateObject("Scripting.FileSystemObject") Set listfile = Fs.CreateTextFile("list.txt",True) path = args(0) If Fs.FolderExists(path) Then Call RecursibleSearch(path) Else MsgBox "このパスは実在しません。" WScript.Quit End If listfile.close MsgBox "Finished creating list.txt" Sub RecursibleSearch(folderspec) Set fol = Fs.GetFolder(folderspec) Set flc = fol.Files For Each fl1 in flc If fl1.Size<67108864 Then listfile.WriteLine fl1.Path End If Next Set sfc = fol.SubFolders For Each sf1 in sfc Call RecursibleSearch(sf1.Path) Next End Sub