I have this code to get all the files from a folder and its sub-directories.
FolderBrowserDialog fb = new FolderBrowserDialog(); if (fb.ShowDialog() == DialogResult.OK) { foreach (string folder in System.IO.Directory.GetFiles(fb.SelectedPath, "*.*", System.IO.SearchOption.AllDirectories)) listBox1.Items.Add(Path.GetFullPath(folder)); } but it returns the file paths like this: C:\Users\RANDOM\Desktop\TheSelectedFolder\SubFolder1\Subfolder2\file.txt How can i make it return only the name of the Selected Folder plus the path of the sub-directories? without the drive letter, username, etc.