How do I determine the most recently updated file in a folder in MATLAB?
36 次查看(过去 30 天)
显示 更早的评论
I need to load the latest file in a directory into the MATLAB workspace, but I do not know how to determine the most recently updated file.
采纳的回答
MathWorks Support Team
2009-12-1
This functionality does not come built-in with MATLAB.
However, this is easy enough to do with a custom function. As an example, use the attached MATLAB function file "getlatestfile.m". This function accepts the full directory path as the input and returns the most recent file in that directory.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!