//1.0 设置从哪个路径读取文件
DirectoryInfo dirinfo = new DirectoryInfo(PdfBgsFinalPath);
List<FileInfo> fList = dirinfo.GetFiles("*.pdf", SearchOption.TopDirectoryOnly).OrderByDescending(x => x.LastWriteTime).ToList();
LogHelper.Info(string.Format(" 文件列表长度为:{0}", fList.Count.ToString()));
LogHelper.Info(string.Format(" 开始时间 {0}",DateTime.Now));
//1.1 获取截至日期 根据当前日期向前推XX小时
DateTime dtEndRecentDateTime = DateTime.Now.AddHours(Convert.ToInt64("-"+HourPreUpdateBgs.ToString()));
LogHelper.Info(string.Format(" 获取dtEndRecentDateTime{0}", dtEndRecentDateTime));
//1.1 读取文件列表
foreach (var f in fList.Where(f => f.LastWriteTime.Date > dtEndRecentDateTime))
{
LogHelper.Info(string.Format(" 获取文件{0} 修改时间{1}", f.Name, f.LastWriteTime));
LogHelper.Info(string.Format(" 获取文件{0} 成功", f.Name));
System.Console.WriteLine(string.Format("{0} 获取文件{1} 成功", DateTime.Now, f.Name));
}