• Perhaps I'm missing something here, but no where in Dave's original query did he mention anything about parsing folder structures, parsing multiple strings or anything like that. He simply asked how to take a single string which he already has (presumably from some other code he already knows how to write) and pull out a particular substring.

    FYI Dave, just in case you wanted to, using the code I gave you above, if you did happen to want to pull out the filename from the string as well you can do so by adding :

    declare @filestring varchar 50

    set @filestring = substring(@origstring,@strlength +1,len(@origstring)-@strlength)