Move a folder

Posted by Ddd under C# category on | Points: 40 | Views : 1543
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//add thie namespace
using System.IO;
namespace ConsoleApplication20jan
class Class8
static void Main()
string s = "c:\\demo";
//1)s : path of the folder to be moved.

//2) c:\\dk: path to which the demo folder will bo moved

//3) c:\dk: must be nonexistent when the program is run

//4) moving is not allowed across different logical drives

Directory.Move(s, "c:\\dk");


Comments or Responses

Login to post response