By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,715 Members | 748 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,715 IT Pros & Developers. It's quick & easy.

How to compare two directories?

P: n/a
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.
Jul 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
could ildg wrote:
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?
--
Michael Hoffman
Jul 19 '05 #2

P: n/a
I found dircmp compare only the direct dirs and files,
and it will not do anything to the sub-directories.

On 6/29/05, Michael Hoffman <ca*******@mh391.invalid> wrote:
could ildg wrote:
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?
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list

Jul 19 '05 #3

P: n/a
could ildg wrote:
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.
--
Michael Hoffman
Jul 19 '05 #4

P: n/a
Thank you~
I get it.

On 6/30/05, Michael Hoffman <ca*******@mh391.invalid> wrote:
could ildg wrote:
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.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list

Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.