I believe this is possible, but I could not begin to tell you how. I will defer to the greater SQL powers here in the forum.
But I would like to throw out WHY??? In my opinion, this is probably not something SQL was "optimized" for compared to other programming language sets, such as VB, C#, C++, or probably a few others. C# and VB are both strong in working against the file system, and have a whole set of classes just for this built in....
And the free Express version of each of the named languages above have this capability...
=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)
Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB.NET Programmer