Look for Files containing a certain Word, and if they do, remove them?
I'm basically trying to do an Installer for additional content to my software, specifically Language Packs. Because of the way my software works I first have to remove old package files of Languages before I can add a new one. Now what I need is for the Installer to "scan" the folder of where the software was installed and find files that start with a specific prefix.
For example if my User wants to install Spanish language it should work like this:
- Scan the folder for other already existing language packages starting with "lang-" prefix
- May find a file, such as "lang-german.pack"
- (If found such a file, silently remove it)
- Install new file "lang-spanish.pack" to folder
But how do I do this exactly?
I apologize if this is a simple question that already has been answered somewhere, but I am unsure what the term is of what I am looking for and am unable to find a solution because of that.
Thank you very much in advance