Purpose:Search for and optionally delete or symlink duplicated files

 

Format:DEDUPE [ranges] [/= /A:[[-|+]rhsadecijopt /D /H /L /N[defjnstz] /P /Q /R /S[[+]n] /SHA1 /SHA256 /SHA384 /SHA512 /V /W[n]] filename directory [directory...]

 

filenameThe filename to search for (* for everything)
directoryThe directories (and optionally subdirectories) to search

 

/A:... (attributes)/Q (quiet)
/D (delete)/R (recycle)
/H (hard links)/S[n] (subdirectories)
/L (symlinks)/SHAx (Hash type)
/N (disable)/V (verbose)
/P (prompt)/Wn (wipe)

 

File Selection

 

Supports command dialog, attribute switches, extended wildcards and, ranges. Use wildcards with caution on LFN volumes; see LFN File Searches for details.

 

File Completion Syntax:

 

The default filename completion syntax is: [1] * [2*] dirs

 

Usage:

 

DEDUPE searches one or more directories, assigns a hash value to files, and then compares the hash value to all the other files. On slow systems this can take a while, so you should try to reduce the amount of searching & hashing by using ranges, and not try to dedupe an entire disk at one time.

 

DEDUPE assumes that the first file it finds for each hash is the original file.

 

Example:

 

Remove all the duplicate files from the E: drive:

 

dedupe /d /s /SHA256 * e:\

 

Options:

 

/=Display the DEDUPE command dialog to help you set the filename and command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.

 

/A:Dedupe those files that have the specified attribute(s) set. See Attribute Switches for information on the attributes which can follow /A:. Do not use /A: with @file lists. See @file lists for details.

 

You can specify /A:= to display a dialog to help you set individual attributes.

 

/DDelete duplicate files

 

/HConvert duplicate files to hard links to the first file.

 

/LConvert duplicate files to symlinks of the first file. Note that to create symlinks, you must be in an elevated session.

 

/NChange default options. This can be any combination of the following:

 

dSkip hidden directories (when used with /S)
eDon't display errors
fDon't display the bytes freed in the summary
jSkip junctions (when used with /S)
sDon't display the summary
tDon't update the CD / CDD extended directory search database (JPSTREE.IDX)
zSkip system directories (when used with /S)

 

/PPrompt before deleting or symlink'ing files.

 

/QQuiet (don't display directories or files as they are processed)

 

/RDelete to the recycle bin

 

/SnSearch subdirectories

 

/SHAxHash algorithm to use. The default is SHA256; you can optionally use SHA1 or SHA512. SHA1 is slightly faster but potentially insecure.

 

/VVerbose output

 

/WnWipe deleted files