Removing rows from MyFolderInfo = dir('myfolder') before specific date
1 次查看(过去 30 天)
显示 更早的评论
Having applied the code:
MyFolderInfo = dir('myfolder') ;
and having thus created the struct "MyFolderInfo" with 5 fields containing information about the content of my directory, I now want to update the list. In particular, I wish to remove from "MyFolderInfo" all rows for the files that were updated before a specific date.
How is this done?
0 个评论
采纳的回答
Adam
2017-8-18
myDate = '10-Jul-2015';
myDateNum = datenum( myDate );
MyFolderInfo( [ MyFolderInfo.datenum ] < myDateNum ) = [];
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!