Friday 11 November 2011

How to Move Directory or Rename Directory in C#.Net?

How to Move Directory or Rename Directory in C#.Net?

First add System.IO;

Code:
  string NewName= string.Empty;
  NewName = "RenameFolder";
  Directory.Move("F:\\myFolder", "F:\\" + NewName);

This will move your directory to new directory.


No comments:

Post a Comment