日期:2014-05-17 浏览次数:20812 次
foreach (string f in Directory.GetFiles(txtSource.Text))
{
System.IO.File.Delete(f);
Library book = new Library();
book.Title =;
book.CategoryID =;
book.Guid = Guid.NewGuid().ToString();
book.Extension = Constants.ExtPDF;
book.LoginName = Constants.UserAdmin;
book.TimeBook = DTPick1.Value;
book.PubDate = DateTime.Now;
}
FileInfo[] fi = new DirectoryInfo("your directory path").GetFiles();
foreach (FileInfo f in fi)
{
// do sth. here...
}