Using T-SQL to Query a File System Folder
You can use xp_cmdshell.
Example:
EXECUTE master.dbo.xp_cmdshell 'DIR "C:\YourDirectory\" /A-D /B'
There's a good, full example with more options here.
CLR integration is also an option, if you're not comfortable with allowing xp_cmdshell to be executed.
See MSDN.