How to rename a folder using asp.net
-
Hi All I have created a folder which I want to rename through coding. If some knows the procedure then pls help me. thanks in Advance.
-
Hi All I have created a folder which I want to rename through coding. If some knows the procedure then pls help me. thanks in Advance.
-
Hi All I have created a folder which I want to rename through coding. If some knows the procedure then pls help me. thanks in Advance.
Hi, I think the possible way to rename the folder is to delete the folder and create the new folder with the new name, before deleting the old folder we should move he contents of that folder to new folder.
Regards, Sandeep Kumar.V
-
Hi All I have created a folder which I want to rename through coding. If some knows the procedure then pls help me. thanks in Advance.
System.IO.DirectoryInfo dInfo = new System.IO.DirectoryInfo(Server.MapPath("1")); if (dInfo.Exists) { System.IO.Directory.Move(Server.MapPath("1"), Server.MapPath("2")); }
I just tried it.Its working fine Here "1" is folder name Best Regard Khan---------------------------------------------------
-
System.IO.DirectoryInfo dInfo = new System.IO.DirectoryInfo(Server.MapPath("1")); if (dInfo.Exists) { System.IO.Directory.Move(Server.MapPath("1"), Server.MapPath("2")); }
I just tried it.Its working fine Here "1" is folder name Best Regard Khan---------------------------------------------------
Thank u all of u, its realy helpfull. I have done my work. Once again thanks