Direcory Rename

  • Thread starter Thread starter rakesh_nits
  • Start date Start date
R

rakesh_nits

Hi All,
I have a very simple problem .I want to rename a directory using C#.But
I am not changing the location of directory neither its name(letters)
just the case(from upper to lower or vice a versa).now if i use
Directory.Move or MoveTo method of directoryinfo class i get the
exception that source and destination must be different.one way around
this problem is that i should use move or moveto twice first moving
this directory to somewhere else then moving it again with the name
having different case.but i don't want to do that.Can somebody tell me
how to do this.I don't know why microsoft people hadn't provided
something for renaming(except move , moveto).Thanks in advance.

Rakesh
 
Back
Top