public static void CopyFiles(double gigaLimits, string toFolder, string where = "") { double limits = gigaLimits * 1024 * 1024 * 1024; double currentSize = 0d; List <string> froms = new List <string>(); List <string> tos = new List <string>(); var files = ScanDataBaseManager.GetWishList(where); foreach (var f in files) { if (!string.IsNullOrEmpty(f.FilePath) && File.Exists(f.FilePath)) { var temp = new FileInfo(f.FilePath); if (currentSize + temp.Length < limits) { currentSize += temp.Length; froms.Add(f.FilePath); tos.Add(toFolder + temp.Name); } } } //FileUtility.TransferFileUsingSystem(froms, tos, false); }