How do I get a list of subdirectories in a directory and then loop through them, changing a variable each time the subdirectory name changes? In Foxpro I can do it in about 4 minutes. Can't figure out how to do it with SQL Query.
UPDATE: I found this...
Execute master..xp_subdirs N'C:\ImpactMD\Images'
...which is good, but how do I get them into something I can loop through?