Searched through this site and tried some suggestions but no luck so far.
I have a bunch of files containing this string in the filename: " 2" for example: test 2.php or imagename 2.jpg
I want to remove all files that contain the " 2" string from root folder (/httpsdocs) and all subfolders.
Tried this:
foreach (glob("* 2.*") as $filename) {
unlink($filename);
and this works but obviously only in root folder.
How can I get this to work recursively?