F*$k, I have 10 or 15 examples in my personal library, for finddepth. They are quite easy to find if you are an experienced "googler".. :-) And if you can't change a line of code from "rmdir" to "rename" , maybe you should HIRE someone who can? This is not a free coding service.
I just googled " File::Find finddepth " and got useful code from at least 5 threads.