Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

shankar2

macrumors 65816
Original poster
Jun 7, 2009
1,020
54
Hi so I have some books in two folders and I want to see which one is missing from one folder, compared to the other. Is there any simple yet powerful utility to do this task? Please advise. Thanks!
 
Basically I want to copy from 2 folders, files with extension .EPUB only (ignore other extension) into a 3rd folder .
 
...or you could be fancy and use an Automator workflow, something like the attached screenshot.

WORKFLOW.png
 
  • Like
Reactions: Weaselboy
The diff app is present in Catalina. Open the Terminal and use diff as follows:
(remember to replace "/path/folder1" and "/path/folder2" with their respective paths or drag folders into the Terminal window)

For simple differences:
Code:
diff /path/folder1 /path/folder2


For recursive differences:
Code:
diff -r /path/folder1 /path/folder2


To learn more about how to use diff:
Code:
man diff
Press the "q" key to exit the man app.
 
Basically I want to copy from 2 folders, files with extension .EPUB only (ignore other extension) into a 3rd folder .
Why don't you use Finder? Open the first folder, type .epub in the search box and drag&drop the files into the third folder. Do the same for the second folder. You will be prompted if there are files with the same name.
 
  • Like
Reactions: bernuli
I also found that the terminal cmd find along with copy works fine! It needed to work with subfolders within the main folder too.
 
If you have Xcode installed, it comes with a tool called FileMerge (under Xcode/Open Developer Tool). Otherwise, if you search for "compare directories macOS" or "compare folders macOS" you'll find many other options out there.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.