I try to rename all the files from a specific Path. To do this I check if the files contains a specific word at the end, as example “Maxillary”. The problem happens when there are 2 or more files that can fit the same renaming method.
Is there any expression or function that can count me the number of files from Path that contains a specific word?
As example I try to rename the “Maxilary” file to something that has “_Upper” at the end. In my example here I already have it so I dont want to rename that file. So i want to build and IF statement that will count my files that contains “Upper”. If the number is bigger than 1 then i wont make the change and continue to next files.
I think the following might be better because the above evaluate not only filename but also all path string, and as windows filesystem is case-insensitive, Upper and upper is same, for example.