Compare two folders and write the matching files to the third folder

2 views (last 30 days)
I have folder 1 with 1000 files and folder 2 with 500 files. There are matching file names in both folders, however, the contents are different. I would like to write the matching file names and it’s contents from folder1 to the third folder say folder3. How can I do it using Matlab?

Answers (1)

M
M on 28 Aug 2018
Have a look at the functions dir and exist.

Categories

Find more on File Operations in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!