I need a tool in which I can import a list of file names, from the clipboard or a text file, and then do a keyword search across a drive or a folder and its sub-folders. I have hundreds of texture replacers, named incorrectly and placed in several folders with incorrect folder structure, so my goal is to find their duplicates (which I want to replace) in another folder with a proper folder structure and proper names, so I can rename the incorrectly named ones.
Something like this:
D:\folder 1\folder 2\1flower%%.dds
D:\folder 1\stone0000.dds
D:\folder 1\folder 2\folder 3\vindovinterior.dds
- All named incorrectly and placed in incorrect folder structure.
Search for a keyword - flower, stone and interior in C:\Program Files\Some Game and find (i.e)
C:\Program Files\Some Game\flowerkitchen.dds
C:\Program Files\Some Game\stoneHD.dds
C:\Program Files\Some Game\windowinterior.dds

2 Answers 2


This sounds like a job for some python scripting but I would strongly recommend backing up the original folder structures first.

The modules & functions to pay especial attention to are glob.glob, os.walk & shutil.

For the Beginner

If you are unfamiliar with python and possibly other scripting languages I would suggest spending a little time reading a good book on the subject. In this case I would specifically recommend Automate The Boring Stuff With Python by Al Sweigart there is even an example in Chapter 9 that shows how to do the following:


  • Making copies of all PDF files (and only the PDF files) in every sub-folder of a folder
  • Removing the leading zeros in the filenames for every file in a folder of hundreds of files named spam001.txt, spam002.txt, spam003.txt, and so on
  • Compressing the contents of several folders into one ZIP file (which could be a simple backup system)

end quote

Where the first two are similar enough to your problem to give you a great starting point but if you have not done any programming or scripting it would be a great idea to read the first couple of chapters before going on to that one.

Note: Automate the Boring Stuff with Python is Free to read under a Creative Commons license. There are also purchasable copies of the book and a Udemy Online Video Course Hint: Read the introduction of the online book before buying anything there may be discounts available.

Disclaimer: I have no financial interest in the above book or course I just think that this is a great book to recommend for a beginner.


Python, while completely free, is highly addictive - once you start using it you may never be able to stop!

  • Thanks for trying to help, but unfortunately I know nothing about python or scripting in general. I'd prefer an automated solution with a gui for this type of work, but I can't find it anywhere. Commented May 17, 2017 at 21:02
  • @karlosmunjos - what you are trying to do is a very specialised type of operation that needs someone to step back and think about the rules for which file needs renaming, how to rename it, etc. - however it is not an uncommon need and very easy to do in languages like python. This is probably why you are unlikely to find a GUI for it. Expanding the answer with a little more help. Commented May 18, 2017 at 5:31
  • 1
    Now that book looks really interesting, I'll be sure to check it out. Once again, thanks for the useful info. Commented May 19, 2017 at 21:09

A duplicate finder like this one should be able to find any duplicates. Usually it is not easy, when used the first time, but sooner or later tools like that come in handy in many situations, so it will be time well spent. You should be able to achieve results in minutes, a first time programmer on the other hand, might take weeks to get there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.