Directory Traversal and Duplicate File Deletion using the SHA-256 Hash

버전 1.0.0.0 (23.4 KB) 작성자: Michael Kleder
On Windows systems, finds duplicate files in a directory tree using SHA-256, then rapidly deletes.
다운로드 수: 2.3K
업데이트 날짜: 2005/11/3

라이선스 없음

PURGETREE - On Windows systems, rapidly identifies duplicate files in an entire directory tree using the SHA-256 hash algorithm, then creates and executes a batch file to rapidly delete all but one of the duplicates.

USAGE:

cd('dirname'); purgetree
OR
cd('dirname');purgetree('displayonly')

dirname = The name of the highest ("parent") directory in the directory tree within which you wish to purge duplicate files.

Notes:

This function rapidly compares large numbers of files for identical content by computing the SHA-256 hash of each file and detecting duplicates. The probablility of two non-identical files having the same hash, even in a hypothetical directory containing millions of files, is exceedingly remote. Since hashes rather than file contents are compared, the process of detecting duplicates is greatly accelerated.

If PURGETREE is called with any arguments, for example purgetree('displayonly') or simply purgetree(1), then the file deletion commands are displayed in the Matlab window but NOT executed (i.e., no files are deleted.)

You must have the freeware file sha256deep.exe on your Matlab path to use this function. The sha256deep.exe file is included in the download, but is also available as part of the md5deep family of functions at:
http://md5deep.sourceforge.net/
The SHA-256 hash algorithm was developed by the National Institute of Standards and Technology (NIST) and is described at:
http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf

When duplicate files are found, the file that has the first alphabetically sorted name is retained; others are deleted.

Carefully tested, but no warranty; use at your own risk.

Michael Kleder, Sep 2005

인용 양식

Michael Kleder (2024). Directory Traversal and Duplicate File Deletion using the SHA-256 Hash (https://www.mathworks.com/matlabcentral/fileexchange/8495-directory-traversal-and-duplicate-file-deletion-using-the-sha-256-hash), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14SP2
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Search Path에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

Comment clarification.