finding same pattern files from two different folders and copying to other folders
Show older comments
Hi everyone,
I have two different folders (Folder 1 and Folder 2) that contain netcdf files from two different fields (UV, and ST) with 3hour-internal outputs. Those files are named as yyyyMMddHH patterns. At some steps, some files are missing. Therefore, I need to find files having the same time steps (same yyyyMMddHH) from each folder and copying into other folders (Folder 3 and Folder 4) respectively. An illustration is attached.
Could you please help?
Thanks

3 Comments
per isakson
on 21 May 2020
How to determine which "files are missing" in FOLDER3 and FOLDER4? By comparing the content of the folders
- FOLDER1 and FOLDER3
- FOLDER2 and FOLDER4
?
wave_buoys
on 21 May 2020
per isakson
on 21 May 2020
Edited: per isakson
on 21 May 2020
Problem is, I fail to deduce the rule that determines which files to copy; the highlighted files. Why should *_2001010100 be copied?
Accepted Answer
More Answers (0)
Categories
Find more on Environment and Settings 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!