Add directory_discrepancy.py.
This commit is contained in:
parent
95d2f10f79
commit
d00d9369bb
1 changed files with 20 additions and 0 deletions
20
directory_discrepancy.py
Normal file
20
directory_discrepancy.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
dir1 = sys.argv[1]
|
||||||
|
dir2 = sys.argv[2]
|
||||||
|
|
||||||
|
files1 = set(os.listdir(dir1))
|
||||||
|
files2 = set(os.listdir(dir2))
|
||||||
|
|
||||||
|
print(f'In "{dir1}" but not in "{dir2}":')
|
||||||
|
print('=============================')
|
||||||
|
for discrepancy in files1.difference(files2):
|
||||||
|
print(discrepancy)
|
||||||
|
|
||||||
|
print()
|
||||||
|
|
||||||
|
print(f'In "{dir2}" but not in "{dir1}":')
|
||||||
|
print('=============================')
|
||||||
|
for discrepancy in files2.difference(files1):
|
||||||
|
print(discrepancy)
|
Loading…
Reference in a new issue