Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
TES5Edit: Show file checksums
{
Show file checksums.
---
Hotkey: Ctrl+Alt+C
}
unit ShowFileChecksums;
function Initialize: integer;
var
f, h: string;
i: integer;
begin
for i := 0 to Pred(FileCount) do begin
f := GetFileName(FileByIndex(i));
if f = 'Skyrim.Hardcoded.keep.this.with.the.exe.and.otherwise.ignore.it.I.really.mean.it.dat' then begin
h := IntToHex(wbCRC32File(ProgramPath + '\\' + f), 8);
f := 'Skyrim.exe';
end else
h := IntToHex(wbCRC32File(DataPath + '\\' + f), 8);
AddMessage(f + ': ' + h);
end;
Result := 1;
end;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment