'How to export to CSV the Hash of each file (SHA-256 & MD5) that are inside a folder in Windows?

I receive files from the client and I need to make sure those files are healthy even after I process these files. What I want to beware of is a situation of possible tampering with already processed files. A customer error may occur for sending files with missing information and the customer wants to edit the original file to say the information was there. That's why I had the idea of ​​producing a report with the hash of these files that are in the reception directory. I tried hard to make everything clearer and more intelligible, even though I didn't speak English.

Scene 1: I have a directory with several text files and I need to export the SHA-256 and MD5 hash calculations from each file to a CSV somewhere.

Scene 2: I have a directory with several subfolders with customer names and within these customers, other subfolders. How to extract SHA-256 & MD5 Hash from all files in these directories and subdirectories?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source