How will i extract a directory name? Like for example:

c:\temp\alvin\alvin.txt

I would just like to have c:\temp\alvin\