I am trying to rename a directory in c# to a name that is the same only with differing case.
f:\test to f:\TEST
I have tried this code:
var directory = new DirectoryInfo("f:\\test");
Well, you don't need to create a separate directory and move everything. Just rename the folder to something different and then back to the name you want:
var dir = new DirectoryInfo(@"F:\test"); dir.MoveTo(@"F:\test2"); dir.MoveTo(@"F:\TEST");