Take a look at the following links to get a file list:
http://www.patrickkeisler.com/2012/11/how-to-use-xpdirtree-to-list-all-files.html
Uses a undocumented feature that could be changed/removed by Microsoft without notice!!
http://oakdome.com/programming/SQL_FileListing.php
Uses the XP_CMDSHELL extended stored procedure and could be a security risk!!