I have a list of strings containing files that should be ignored to manipulate goals. Therefore, I am curious how to handle a situation in which there is a wild card.
For example, possible entries in my list of strings:
C:\Windows\System32\bootres.dll C:\Windows\System32\*.dll
The first example, which, it seems to me, is easy to handle, I can just do a line check (ignoring the case) to see if the file matches. However, I'm not sure how to determine if a given file can match the wild card expression in the list.
The little background is what I do. The user can copy the file to / from the location, however, if the file matches any file in my list of lines, I do not want to allow copying.
There may be a need for a more effective approach to solving this issue.
The files that I want to exclude are read from the configuration file, and I get the string value of the path that I am trying to copy. It seems that I have all the information I need to complete the task, this is just a matter of the best approach.
source share