Kevin Davis

Kevin Davis

  • NA
  • 52
  • 50.8k

Getting Main directory Name

Jan 20 2012 11:31 AM
HI all.

I have several folders that have folders inside of them.  I'm trying to get just the top level folder name, such as,

I have:
D:\Music\Rock\Scorpions
D:\Music\Rock\Scorpions\World Wide Live


I just want to return "Music" for both lines.  I know how to get a list of all the directories for a certain drive, but when I scan directories for all files, I just want to return the top level directory name.

Thanks for your help!

Zcast

Answers (1)