in reply to Re^2: elseif syntax error
in thread elseif syntax error

You don't need recursion, because the "find" function is traversing the directory structure for you.

The errors you see are due to renaming of a directory before it is finished being used. Try "finddepth" instead of "find". The "finddepth" routine will process a directory's contents before the directory itself.