Here is how I might approach it. I would make a list of directories to look in.
dirsToClean = {"C:\\Users\\rpotter\\Downloads",
"C:\\Users\\rpotter\\Documents", "C:\\Users\\rpotter\\Desktop"};
Then I would make a list of keywords.
keywords = {"test", "temp",".tmp"};
And add wildcards to either side of the keywords.
keywordsWC = "*" <> # <> "*" & /@ keywords
(*{"*test*", "*temp*", "*.tmp*"}*)
Now I can search for those files.
filesToDelete = FileNames[keywords2FileNames[keywordsWC, dirsdirsToClean, IgnoreCase -> True] (*Or False as desired*)
If everything looks good we can delete them.
FileDelete[filesToDelete]DeleteFile[filesToDelete]
But maybe before deleting them we move them to a folder so we can look through them first.
CreateDirectory["c:\\FilesToDelete"]
RenameFile[#,
FileNameJoin[{"c:\\FilesToDelete",
FileNameSplit[#][[-1]]}]] & /@ filesToDelete
And then just delete all the files in that directory.