Finding and Deleting Duplicate Files

Advanced Renamer forum
#1 : 28/08-19 01:25
RH
RH
Posts: 1
New to this forum; so please be gentle.

I did a search here for 'deleting duplicate files' and didn't find anything helpful. Probably a bad search argument on my part.

I have a large number of .mp3 files in a folder on a drive. I'd like to be able to find them based on filename, file size, and file type and delete one of them as a batch process. I'm so new to Advanced Renamer that I have no idea how to set up such a rule.

Can anyone point me to the wiki or thread that covers this?

TIA
rh


28/08-19 01:25
#2 : 28/08-19 18:39
David Lee
David Lee
Posts: 1125
It's an intriguing problem but I don't have time to investigate. However you should able to achieve this using some cunning scripting!

Use the script method without a return statement so that there are no changes to the filenames.

For each entry in the list use app.currentIndex to obtain the position of each file in the list.

Then, run though all the files in the list by using app.getItem to load each file into a new item object. Search for duplicates using the attributes of the item object and move duplicates to a new folder by setting item.newPath. (You can use item.path to return the current path). You may need to keep track of the files you have moved using an array variable initialized in the pre batch script.

Once you have run the batch you can simply delete the new sub folder that contains all your duplicates.

I know that all the individual steps will work - you'll just have to sort out the code required to identify the duplicates and see if it all comes together.

Should be simple if you are familiar with scripting but it will be a challenge otherwise and require some effort sorting out JavaScript! However I had no knowledge of JavaScript either when I first came across Advanced Renamer and it just takes a bit of effort - with the assistance of Google - to sort it out.

Best of luck!


28/08-19 18:39
#3 : 01/09-19 14:02
L B
L B
Posts: 74
Reply to #1:

Just wondering why you need to use ARen for it? I am sure there are many other freeware apps out there for this purpose, especially if you are using Windows OS. Here are come resources a quick google search threw up.

https://www.howtogeek.com/200962/how-to-find-and -remove-duplicate-files-on-windows/
https://www.techspot.com/article/1648-delete-dup licate-files/
https://windowsreport.com/find-remove-duplicate- files-windows-10/

One alternative way I see for achieveing this, not using ARen or another app, is using MS Excel and Windows Command prompt. Open the command prompt and use the "dir" command (to know all the options under the command, type "dir /?") to get the required details about files you wanna remove dupes from. Export them to a text file by adding " > list.txt" to the dir command you end up formulating. Now import the contents into MS Excel, and use the Text Import Wizard to arrange it in cells. Use Excel's sort feature to sort the files by name, size, etc. to identify the dupes. Using concatenate function of excel make a command to remove the required dupe files. The command is "del" or "erase". Run the same in the command prompt. Done!

Its complicated, as in there are too many steps, so I think its better to search for an app that does this for you.


01/09-19 14:02