SetStandardFile ( FilePath , Type 〔, Mode〕 )
SetStdFile ( FilePath ,Type 〔, Mode〕 )
値 | 意味 |
---|---|
StdInput | 標準入力 |
StdOutput | 標準出力 |
StdError | 標準エラー |
値 | 意味 |
---|---|
Create | 新規モード |
Append | 追加モード |
' Backup.BAT実行時の標準出力,標準エラー出力をそれぞれ
' BatOut.TXT,BatErr.TXTに書き込む
SetStandardFile ( _SCF_+"BatOut.TXT" ,StdOutput ,Create )
SetStandardFile ( _SCF_+"BatErr.TXT" ,StdError )
If Exec ( _SCF_+"Backup.BAT" ,True ) Then
MessageBox ( "Execコマンド 成功!" )
Else
MessageBox ( "Execコマンド 失敗!" )
End
ResetStandardFile ( StdOutput )
ResetStandardFile ( StdError )