Is it possible to query a folder in TSQL, from SQL Management Studio, and return a list of file names? If so, how?
+4
A:
CLR integration is also an option, if you're not comfortable with allowed xp_cmdshell being executed.
http://msdn.microsoft.com/en-us/library/ms345136%28SQL.90%29.aspx
ScottE
2010-02-28 01:32:46
+1 because I personally like the features offered by this mechanism - they have come in very useful to me for all kinds of tasks that are obtuse in TSQL. And +10 to Microsoft for creating this .NET integration feature in SQL Server.
John K
2010-02-28 01:35:55