Have dir() only accumulate files between certain dates
Show older comments
Is there a way to make the dir() function only accumulate files from between certain dates?
I have the following code,
S = dir(fullfile(SomePath,'**/*.xls'));
Which accumulates all the xls files in the "SomePath" directory. The SomePath directory contains upwards of 10,000 folders each with potentially 5 or 6 xls files in them. Needless to say, the command takes a significant amount of time to run, about 15 mintues.
I have this line in a function that looks for a specifc one of the xls files in the SomePath directory. Based on various inputs to this function I should know within a range of about 10 days of when the file should have been added to the SomePath directory.
Is there a way to make dir only look at that range of 10 days instead of all the folders and xls files in the SomePath directory?
Accepted Answer
More Answers (0)
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!