0

I am able to get only common files through this code i want size comparison of both path directories.

import filecmp
result=filecmp.dircmp(path1,path2)
print result.report()
PythonF
  • 456
  • 1
  • 5
  • 21

1 Answers1

0

Please take a look at this question here: Calculating a directory's size using Python? There are a lot of ways of doing this, and on this question they list several "tools" that may fit your problem

  • But don't we have any direct function which compare size of python directories like filecmp.dircmp do by providing all common list directories? – Ashish Feb 07 '21 at 17:39
  • I don't believe so. You can also have a look at this ready funcion: https://www.thepythoncode.com/article/get-directory-size-in-bytes-using-python – Elvis Cantelli Feb 07 '21 at 19:28