关于一文件夹????

boytomato 2003-10-16 04:40:13
要查找一个文件夹下所有 一个时间段建立的文件.
...全文
43 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
boytomato 2003-10-16
  • 打赏
  • 举报
回复
查找一个时间段内一个文件夹下的所有文件,在则copy 到另一个文件下.
saien 2003-10-16
  • 打赏
  • 举报
回复
up
47522341 2003-10-16
  • 打赏
  • 举报
回复
^_^;来晚了;搞定;
liufuyahong 2003-10-16
  • 打赏
  • 举报
回复
procedure TForm1.FindFile(strDir,strName:string);
var
sr: TSearchRec;
FileAttrs: LongInt;
begin
StringGrid1.RowCount := 1;
if CheckBox1.Checked then
FileAttrs := faReadOnly
else
FileAttrs := 0;
if CheckBox2.Checked then
FileAttrs := FileAttrs + faHidden;
if CheckBox3.Checked then
FileAttrs := FileAttrs + faSysFile;
if CheckBox4.Checked then
FileAttrs := FileAttrs + faVolumeID;
if CheckBox5.Checked then
FileAttrs := FileAttrs + faDirectory;
if CheckBox6.Checked then
FileAttrs := FileAttrs + faArchive;
if CheckBox7.Checked then
FileAttrs := FileAttrs + faAnyFile;

if FindFirst(strDir+strName, FileAttrs, sr) = 0 then
begin
repeat
if (sr.Attr and FileAttrs) = sr.Attr then
begin
if (sr.FindData.ftCreationTime>时间起点)and (sr.FindData.ftCreationTime<时间终点) then
// 操作
end;
until FindNext(sr) <> 0;
FindClose(sr);
end;
end;

5,379

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧