Batch renamer that will write checksums?

Megalith

24-bit/48kHz
Joined
Aug 20, 2006
Messages
13,000
Anyone know of a renamer that can generate a checksum for a file and rename that file into that value?
 
Powershell can do this easily:
Code:
Get-FileHash .\aes.ps1 | %{rename-item $_.path $_.hash -whatif}
What if: Performing the operation "Rename File" on target "Item: C:\Users\jgentile\Documents\WindowsPowerShell\aes.ps1 Destination: C:\Users\jgentile\Documents\WindowsPowerShell\47C6308F0747E3C0217C44BEB86E027124DE05CBFF32417A91BCDF7F98DF9302".

get-filehash accepts parameters like '-algorithm sha256' or '-algorithm sha512'.

If you want to process multiple files, try:
Code:
gci *.txt | get-filehash | %{rename-item $_.path $_.hash -whatif}

Just an illustration of what you can do, look up the relevant powershell functions for better insight.
 
Back
Top