Copy File TXT di C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Copy_File
{
class Program
{
static void Main()
{
string fileName = “A.txt”;
string sourcePath = @”D:\SIMULASI”;
string targetPath = @”D:\SIMULASI\Target”;
string sourceFile = System.IO.Path.Combine(sourcePath, fileName);
string destFile = System.IO.Path.Combine(targetPath, fileName);
if (!System.IO.Directory.Exists(targetPath))
{
System.IO.Directory.CreateDirectory(targetPath);
}
System.IO.File.Copy(sourceFile, destFile, true);
Console.WriteLine(“Press any key to exit.”);
Console.ReadKey();
}
}
}

Tidak ada komentar:

Posting Komentar

Profile Page Screen - Flutter UI

Profile Page Berikut ini adalah contoh  source code untuk Design Profile Page menggunakan flutter,  sebelumnya jangan lupa untuk membua...