필터 지우기
필터 지우기

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Whos에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by