private void CopytoAwaypath(List <string> filepaths) { filepaths.ForEach(X => { string changhost = X.Replace(Settings.Mainhost.hostname, Settings.Awayhost.hostname); string awaypath = changhost.Replace(Settings.Mainhost.path, Settings.Awayhost.path); if (!IOhelper.FileExists(awaypath)) { IOhelper.FileCopy(X, awaypath); } }); }
public void AddDiffDBFile(EMRN emrn, Hostlocate host, string type) { DateTime transdate = DateTime.ParseExact(emrn.TransNo.Substring(1, 8), "yyyyMMdd", null); string hostpath = PublicMethod.pathhead(host) + PublicMethod.pathdate(transdate); string Filename = @"\" + type; Compair_DIFF tmpdiff = new Compair_DIFF(); if (!IOhelper.FileExists(hostpath + Filename)) { tmpdiff.Datetime = transdate; tmpdiff.Filename = Filename; tmpdiff.FilePath = hostpath + Filename; tmpdiff.Hostname = host.hostname; tmpdiff.Note = "比對TransNo缺少檔案"; difflist.Add(tmpdiff); } }