opc.three (6/9/2013)
Note that xp_dirtree is an undocumented stored procedure.
I absolutely agree. It would be much better to use something that's not only well documented, but tried and true, as well... like xp_CmdShell to call a DOS Dir /b.
--Jeff Moden
Change is inevitable... Change for the better is not.