check a folder every 10 sec

2 次查看(过去 30 天)
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