フィルターのクリア

check a folder every 10 sec

2 ビュー (過去 30 日間)
Andrew
Andrew 2013 年 6 月 20 日
clc
if Num<5
display (wait)
D = dir(['C:\s', '\*.txt']);
Num = length(D(not([D.isdir])))
else display (ok).
end
how can i check the folder C:\s every 10 sec and when the number of txt files are 5 to stop?....something like the above code....thank you....

採用された回答

the cyclist
the cyclist 2013 年 6 月 20 日
D = dir(['C:\s', '\*.txt']);
Num = length(D(not([D.isdir])));
while Num < 5
D = dir(['C:\s', '\*.txt']);
Num = length(D(not([D.isdir])));
pause(10)
end
  1 件のコメント
Andrew
Andrew 2013 年 6 月 20 日
thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by