Or you could download the freeware MMD.exe (multi-level make directory) 32-bit command line utility from www.ScriptLogic.com

Being that it is C++ code, it is probably a bit faster than a UDF.

-Brian