On Error Resume Next
  Dim fso, folder, files, NewsFile,sFolder

  Set fso = CreateObject("Scripting.FileSystemObject")
  sFolder = Wscript.Arguments.Item(0)
  If sFolder = "" Then
      Wscript.Echo "No Folder parameter was passed"
      Wscript.Quit
  End If
  Set NewFile = fso.CreateTextFile(sFolder&"\FileList.txt", True)
  Set folder = fso.GetFolder(sFolder)
  Set files = folder.Files
  For each folderSub In folder.SubFolders
  For each subFiles In folderSub.files
    NewFile.WriteLine(subFiles.Name)
  Next
  Next
  NewFile.Close

If str.Contains(“string”Then

MessageBox.Show(“Yeps, that string is in here!”)

Else

MessageBox.Show(“No, the string is not in here!”)

End If

Advertisements