My path is \\\\server\\folderName1\\another name\\something\\another folder\\
\\\\server\\folderName1\\another name\\something\\another folder\\
How do I extract each folder name into a string if I don\'t know how many
Or, if you need to do something with each folder, have a look at the System.IO.DirectoryInfo class. It also has a Parent property that allows you to navigate to the parent directory.