string fileName = @"abc.mp4"; string sourcePath = @"C:\test\source"; string targetPath = @"C:\test\copy"; string sourceFile = Path.Combine(sourcePath, fileName); string destFile = Path.Combine(targetPath, fileName); if (!Directory.Exists(targetPath)) { Directory.CreateDirectory(targetPath); } Console.WriteLine("Coping a File Started at {0}", DateTime.Now); FileInfo file = new FileInfo(sourcePath.ToString() + "\\" + fileName.ToString()); Console.WriteLine("The File Size is {0} MB", ((file.Length)/1024)/1024); FileInfo sourcesize = new FileInfo(sourcePath.ToString() + "\\" + fileName.ToString()); FileInfo destsize = new FileInfo(targetPath.ToString() + "\\" + fileName.ToString()); double si = 0.0; while (si != 100) { File.Copy(sourceFile, destFile, true); si = (destsize.Length / sourcesize.Length) * 100; Console.Write("{0} % Completed", si); }
System.IO.BinaryReader
System.IO.BinaryWriter
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)