0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

すごい雑に特定フォルダにファイルが出現したらアラームを鳴らす

0
Posted at

すごい雑。とりあえずテストで生成される巨大なログファイルの生成を待っている間席を外したい場合など。

ファイルが出力されるはずのフォルダに移動して、以下のコマンドを入力(ワンライナーなのでコピペでOK)

 while($True){ if((dir ./*.*).Length -ne 0){C:\Windows\Media\Alarm01.wav; break} sleep 1 }

wavファイルにはあらかじめなんらかのプレイヤーが関連付けられている必要がある。なにかメディアプレイヤーをインストール/アンインストールしたあとは関連付けが外れている場合があるので注意する。

出力されるファイルの個数が決まっている場合は(dir ./*.*).Length -ne 0の数式を適当に変更すればヨシ。

以下にもアップしました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?