Within a script, can I close or redirect a Windows File Explorer window opened with 'winopen'?
2 views (last 30 days)
Show older comments
I have a script that processes iteratively through a number of directories, spending a few hours per directory. It would be very convenient to be able to view the directory currently being processed at each moment while the script is running.
MATLAB's 'winopen' command can be used to open a file explorer window at the start of processing each new directory, which is helpful. But these windows proliferate if the script issues a new 'winopen' each time it starts processing a new directory. With a lot of such windows open, it is tough to see which directory is currently being processed.
Hence my question: Is there a way to either:
- close an existing Windows Explorer window on a directory when I am done processing that directory, or
- point the existing Windows Explorer window to the new directory when the script changes directories?
Or maybe there is some entirely different approach?
Thanks for any suggestions,
0 Comments
Accepted Answer
Jan
on 19 May 2022
You could open a tree view to the folder inside Matlab:
[mtree, container] = uitree('v0', 'Root','C:\') % Still working?
This wa supported in R2018b, but maybe newer Matlab versions limit this.
More Answers (1)
Paul
on 21 May 2022
Maybe using an actxserver is a viable approach. I've used it for interacting with Power Point. It's not so bad once you get the hang of it and can find the good documentation on the methods, properties, objects, etc.
I did a quick search and found this link that seems to be on point and might be a good place to start. No idea what capabilities are actually available, but I'd be surprised if you can't make it do what you want.
0 Comments
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!