Eirikur Eiriksson (4/3/2015)
I know I'm somewhat late to the show, haven't read through the whole trail and therefore might be missing something, but my approach would be the xp_cmdshell with "dir /S /N /C" and then filter and parse the results, in my experience it's much more efficient than creating an OLE Object.😎
I absolutely agree but the stigma that some DBAs have against using xp_CmdShell is frightening while there is less of a stigma about using OLE objects. Where one may not be allowed, the other might.
--Jeff Moden
Change is inevitable... Change for the better is not.