プロが教える店舗&オフィスのセキュリティ対策術

下のプログラムはどんな処理をしているのか教えていただけないでしょうか?
全プログラムではなく一部抜粋です。
特に(1)「""^\*\*\*\*\*$""」の部分と(2)「f1.WriteLine( "cscript //nologo test.vbs sab.txt")」、(3)「rsh.Run "cmd /c """ & pth& "batta.bat""",1,false」を知りたいです。



f1.WriteLine( "findstr /V ""^\*\*\*\*\*$"" sabun.txt | findstr ""^[0*]"" >> sab.txt")
f1.WriteLine( "cscript //nologo test.vbs sab.txt")
f1.close

Set rsh = Wscript.CreateObject("Wscript.Shell")
rsh.Run "cmd /c """ & pth & "batta.bat""",1,false

A 回答 (1件)

>(1)「""^\*\*\*\*\*$""」の部分


正規表現です。
findstrで*****を含む行を検索しています。

>(2)「f1.WriteLine( "cscript //nologo test.vbs sab.txt")」
コマンドラインのスクリプトエンジンで
testvbs sab.txt を実行しています。
(sab.txtが引数)

>(3)「rsh.Run "cmd /c """ & pth& "batta.bat""",1,false」
コマンドラインで
バッチファイル batta.bat
を実行しています。
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!