I have been given task to rename each and every subfolders inside a folder. If the subfolders have more folders I have to rename that too. Can anyone help me with this problem?
We have to check for each folder if there is a folder inside it or not, if it’s present we will go inside folder and rename it and check for existence of other folders in those folder.
You have to do string manipulations in side the body. all the best!
What String manipulations?
How to get only subfolder name without getting the whole path
Hope this could help you. You can use Directory.GetDirectories to retrieve all the subfolders and then Path.GetFileName to get the name of each subfolder.
Thanks and best regards,