See DirectoryInfo.Name:
string dirName = new DirectoryInfo(@"c:\projects\roott\wsdlproj\devlop\beta2\text").Name;
More Related Contents:
- How to remove illegal characters from path and filenames?
- Checking for directory and file write permissions in .NET
- Copy the entire contents of a directory in C#
- C# Test if user has write access to a folder
- How to get a path to the desktop for current user in C#?
- If a folder does not exist, create it
- Getting the absolute path of the executable, using C#?
- Getting all file names from a folder using C# [duplicate]
- How do I delete a directory with read-only files in C#?
- Zip folder in C#
- Microsoft Azure: How to create sub directory in a blob container
- How can I list the contents of a .zip folder in c#?
- Get target of shortcut folder
- Getting Downloads Folder in C#? [duplicate]
- Retrieving files from directory that contains large amount of files
- How do I get the directory from a file’s full path?
- How do I find the parent directory in C#?
- List all files and directories in a directory + subdirectories
- Remove readonly attribute from directory
- DotNetZip add files without creating folders
- How do I detect when a directory or file changes without constant scanning
- Properties.Settings.Default.Save(); -> Where is that file
- Delete files older than 3 months old in a directory using .NET
- Renaming a directory in C# [closed]
- Given full path, check if path is subdirectory of some other path, or otherwise
- .Net’s Directory Services throws a strange exception
- Directory.Move doesn’t work (file already exist)
- C# Searching for files and folders except in certain folders
- Best way to iterate folders and subfolders
- C# – Set Directory Permissions for All Users in Windows 7