' FileSearchWithOutput.vbs Dim folderPath, searchValue, outputFilefolderPath = InputBox("フォルダのパスを入力してください:")searchValue = InputBox("検索する部分文字列を入力してください:")outputFile = "output.txt" If folderPath = "" Or searchValue = "" Then MsgBox "入力がキャンセルされたか、無効な値が入力されました。", vbExclamation, "エラー" WScript.QuitEnd If …