import hashlib
for filename in os.listdir(directory):
if filename.endswith(".xml"):
#print(directory+filename)
with open(directory+filename, encoding="utf8") as file_to_check:
# read contents of the file
data = file_to_check.read()
# pipe contents of the file through
md5checksum = hashlib.md5(data.encode('utf-8')).hexdigest()
Till Next Time
Geen opmerkingen:
Een reactie posten