`npm i @kingotten/remove-duplicates`
npm install @kingotten/remove-duplicatesnpm i @kingotten/remove-duplicates
js
const { RemoveDuplicates } = require("@kingotten/remove-duplicates");
const settings = {
dry_run: false, // run without deleting files
recursive: true, // run in subfolders (does not compare to subfolders tho)
depth: 2, // check 2 folders deep
quiet: true, // run without logging information about the command
filter: "", // regex filter performed on each filename
};
// use with single string
const path = "path/to/folder";
await RemoveDuplicates(path, settings);
// use with array
const paths = ["PathA", "PathB", "PathC"];
await RemoveDuplicates(paths, settings);
`
Global install
npm i -g @kingotten/remove-duplicates
Global Use
`
rmdupes -h
rmdupes .
rmdupes FolderA
rmdupes FolderA FolderB
rmdupes FolderA -d -r -D=2
rmdupes E:/Absolute/Path/To/Folder
``