How to compare two directories?

C

could ildg

I want to compare 2 directories,
and find If all of theire sub-folders and files and sub-files are identical..
If not the same, I want know which files or folders are not the same.
I know filecmp moudle has cmpfiles function and a class named dircmp,
they may help, but I wonder if there is a ready-to-use function in python libs?
If not, would somebody like to give me some propositions?

Thank you.
 
M

Michael Hoffman

could said:
I want to compare 2 directories,
and find If all of theire sub-folders and files and sub-files are identical.
If not the same, I want know which files or folders are not the same.
I know filecmp moudle has cmpfiles function and a class named dircmp,
they may help, but I wonder if there is a ready-to-use function in python libs?

That's a good start. Why doesn't dircmp work for you?
 
C

could ildg

I found dircmp compare only the direct dirs and files,
and it will not do anything to the sub-directories.
 
M

Michael Hoffman

could said:
I found dircmp compare only the direct dirs and files,
and it will not do anything to the sub-directories.

The documentation for dircmp.report_full_closure() disagrees with you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top