About-Read​DirectoryC​hangesW

Is there any method to use th API: ReadDirectoryChangesW and FindFirstChangeNotification in matlab for us matlab users to monitor a folder for checkfor if there are new files or someother information? Thanks for your help!

답변 (1개)

Walter Roberson
Walter Roberson 2011년 11월 3일

0 개 추천

You could probably do it via Mex or ActiveX (if you could find an appropriate ActiveX control)
Standard warning: the fact that a file has come in to existence seldom means that the file is ready to read. I am not aware of any MS Windows API call that can tell you that a file is "ready to be read"... especially if a networked file system is involved.

댓글 수: 3

NK University
NK University 2011년 11월 4일
Thank you for your kindly help, While, how to change it to Mex file that can be used in Matlab? I am a newer with matlab, might it be more clearly?
Walter Roberson
Walter Roberson 2011년 11월 4일
I am not familiar enough with Mex or Windows to answer this.
I do find that on MS Windows, MATLAB uses Windows Change Notification Handles internally, but I do not see any way for the users to access them.
I also seem to recall that there is a Java class that can be used to get change notifications; I have seen it posted 3 or 4 times, but unfortunately I do not seem to be able to track it down.
NK University
NK University 2011년 11월 4일
Thank you for your kindly help again. I will try it. Thank you for your kindly help!

댓글을 달려면 로그인하십시오.

질문:

2011년 11월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by