Created
March 4, 2017 10:46
-
-
Save cmitz/0415d8f558486002f9888ce4c0100ffb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pathname' | |
require 'fileutils' | |
dir = '.' | |
files = Dir["#{dir}/*-2.NEF"] | |
p "Files to remove: #{files.count}" | |
files.each do |file| | |
FileUtils.rm(file) | |
p "FileUtils.rm(file) #{file}" | |
end | |
p "Removed #{files.count} files" | |
# After duplicate images are deleted, RMB on folder in Lightroom | |
# and use "Synchronise" to cleanup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code is to remove duplicate photos (.NEF) when Lightroom fucked up.