Y
yuvalmus
Guest
Hello, I made a messaging program and among other things, I wrote this code:
string FolderPath = .........
foreach (string s in Directory.GetDirectories(FolderPath))
{
Console.WriteLine(s.Remove(0, FolderPath.Length));
}
Console.ReadLine();
This code goes to a specific folder (directory...) and writes all the sub-directories' names. I wanted to ask if it is possible that the program will write every name of folder with a digit near it- every folder's name will automatically have a digit near it (the order is not important). For example- if the order is: "hello!", "goodbye", "nice", "good" ,then the program will show it as: 1) hello! 2) goodbye 3) nice 4) good. (the code actually organizes the names as a vertical list automatically, just for you to know...).
Can you help me?
Continue reading...
string FolderPath = .........
foreach (string s in Directory.GetDirectories(FolderPath))
{
Console.WriteLine(s.Remove(0, FolderPath.Length));
}
Console.ReadLine();
This code goes to a specific folder (directory...) and writes all the sub-directories' names. I wanted to ask if it is possible that the program will write every name of folder with a digit near it- every folder's name will automatically have a digit near it (the order is not important). For example- if the order is: "hello!", "goodbye", "nice", "good" ,then the program will show it as: 1) hello! 2) goodbye 3) nice 4) good. (the code actually organizes the names as a vertical list automatically, just for you to know...).
Can you help me?
Continue reading...