Removing rows from MyFolderInfo = dir('myfolder') before specific date

조회 수: 1 (최근 30일)
Ulrik William Nash
Ulrik William Nash 2017년 8월 18일
답변: Adam 2017년 8월 18일
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?

채택된 답변

Adam
Adam 2017년 8월 18일
myDate = '10-Jul-2015';
myDateNum = datenum( myDate );
MyFolderInfo( [ MyFolderInfo.datenum ] < myDateNum ) = [];

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by