1-misol. D diskda Salom nomli yangi papka yaratish.
class Program { static void Main(string[] args)
{
//d: diskda salom nomli papka yaratadi System.IO.Directory.CreateDirectory(@"d:\\salom");
Console.WriteLine("salom");
Console.ReadKey();
} }
misol. d:\aka papkasini c:\aka joyga ko’shirish.
class Program { static void Main(string[] args)
{
System.IO.Directory.Move(@"d:\\aka","c:\\aka");
Console.WriteLine("dastur ishladi");
Console.ReadKey();
} }
misol. d:\aka papkasini o’chirish.
class Program { static void Main(string[] args)
{ bool a = System.IO.Directory.Exists(@"d:\\aka");
if (a) {
System.IO.Directory.Delete(@"d:\\aka");
Console.WriteLine("d: diskdagi aka papkasi o'chirildi"); } else Console.WriteLine("aka papkasi yo'q");
Console.ReadKey();
} }
Do'stlaringiz bilan baham: |