r/programmingrequests • • Jul 27 '17

[Request] A simple program to delete files that have their hexadecimal hash in their filenames

I've exported .csv and .html files of the results of the duplicate images generated by Similarity which is a decent free software. Now the problem is that there are about 15'000 images that have duplicates renamed with their hashes in Hydrus Network.

I'm looking to keep the files with their original filenames, not ones that are renamed to their hashes. I can manually do this in Similarity, but since there are 15K files, it'll take a lot of time so I'm requesting a simple code to do that for me.

Any helps would be much appreciated.

2 Upvotes

30 comments sorted by

View all comments

Show parent comments

1

u/ProffesorCalculus Jul 29 '17

Yes, it does, but still it doesn't delete.

Does it need to have the script inside one of the two directories?

2

u/[deleted] Jul 29 '17 edited Oct 06 '17

[deleted]

1

u/ProffesorCalculus Jul 29 '17

This is what I get after changing the script. Still, nothing happens but a temphashout.txt file is created in folder1. I checked again with other images but again, the script doesn't work.

2

u/[deleted] Jul 29 '17 edited Oct 06 '17

[deleted]

1

u/ProffesorCalculus Jul 29 '17

Yes. I even created an empty text document and copied it into the second folder.

2

u/[deleted] Jul 29 '17 edited Oct 06 '17

[deleted]

1

u/ProffesorCalculus Jul 29 '17

Maybe it's because you're on Windows 7 and I'm on Windows 10?

I added that piece, nothing changed in the CMD (nothing additional to the previous ones).

I'm not wasting my time, I love to see it work!

2

u/[deleted] Jul 29 '17 edited Oct 06 '17

[deleted]

1

u/ProffesorCalculus Jul 29 '17

Apparently, adding a pause below :hashcheck makes no difference.

Also for adding echo %1.

What do you mean by saying the directory must be empty? What should I do?

2

u/[deleted] Jul 29 '17 edited Oct 06 '17

[deleted]

→ More replies (0)