Skip to content

Instantly share code, notes, and snippets.

@kebman
kebman / checkFileDupes.js
Created October 2, 2015 02:12
Check for duplicate files with Node.js
// find duplicate files with Node.js, cuz, you know, it's useful
var Promise = require('bluebird');
var fs = Promise.promisifyAll(require('fs'));
var crypto = require('crypto');
var path = require('path');
var pathA = "."; // folder you're in, wherever that might be
var pathB = "/path/to/the/directory/you/want/to/compare/it/to"; // yes, yes, argv, etc, but I haven't bothered yet, ok!