I manage to collect quite a few files in the course of a week, most of them images. After a while, I run them all through KRename, usually along the lines of yyyy-mm-ww-xxxx, where yyyy == year, mm == month, ww == week and xxxx == number, i.e. 2008-04-01-0153.jpg, then move them into a folder named yyyy-mm-ww. Keeps things tidy (enough) for my purposes.
Problem is, I get a lot of duplicates. When I was using a Mac, I used File Buddy to find the dupes and move them into a separate folder so I could visually sort and remove the dupes. The closest I've come on Kubuntu is KleanSweep. If I tell it to save a backup archive, it'll go ahead and make a tar.gz of all the dupes, then delete the originals. I can then open the archive and visually sort & delete dupes, then move the survivors back into their original folder. It works, but it's just a bit cumbersome.
What I'd like to do is pipe the output of fdupes into mv and move all dupes into a specific folder for visual inspection. How would I go about that? I'm thinking that it's going to have to be a script, but my scripting is nowhere near as good as I'd like it to be. I imaging the pseudocode would look somewhat like this:
In other words, start at the first line of fdupes output, set that to var x, then mv x to sort folder. Continue as long as you aren't at end of file.
Now, how would this really work?
Problem is, I get a lot of duplicates. When I was using a Mac, I used File Buddy to find the dupes and move them into a separate folder so I could visually sort and remove the dupes. The closest I've come on Kubuntu is KleanSweep. If I tell it to save a backup archive, it'll go ahead and make a tar.gz of all the dupes, then delete the originals. I can then open the archive and visually sort & delete dupes, then move the survivors back into their original folder. It works, but it's just a bit cumbersome.
What I'd like to do is pipe the output of fdupes into mv and move all dupes into a specific folder for visual inspection. How would I go about that? I'm thinking that it's going to have to be a script, but my scripting is nowhere near as good as I'd like it to be. I imaging the pseudocode would look somewhat like this:
Code:
while not eof set x to path/name of current dupe file move x to predesignated sort folder
Now, how would this really work?
Comment