Create checksum for directory in windows
I want to create a checksum for a directory and I am following the answer given in this post.
But the problem is that it creates a checksum for every file in the directory, and I want to create a checksum for the directory.
I am new to this kind help. Thank.
+3
Farrukh ahmed
source
to share
1 answer
@echo off
set directory=.
dir /s "%directory%" >"%temp%\filelist"
md5 "%temp%\filelist" >> output.txt
del/q "%temp%\filelist"
- a recursive list of all files in the specified directory is written to a temporary file
(use.
for the current directory,%~1
for the first command line parameter) -
md5
the hash of this file is appended tooutput.txt
in the current directory - temporary file deleted
+1
wOxxOm
source
to share