文件都是按照日期来命名的,例如
20050101.txt
20050102.txt
...
20050727.txt
20050728.txt
20050729.txt
我想批量删除从20050501.txt-20050630.txt
如何操作啊??谢谢拉
20050101.txt
20050102.txt
...
20050727.txt
20050728.txt
20050729.txt
我想批量删除从20050501.txt-20050630.txt
如何操作啊??谢谢拉
支持通配符的,但这里也不好把握
2)Format/FormatDateTime建立格式为yyyymmdd的,然后DeleteFile的_____________________
comment by Liu Yang
http://lysoft.7u7.net
QQ Group: 7858482
你的群满员鸟...........
sr: TSearchRec;
FileAttrs : integer;
beginFileAttrs := not (faReadOnly + faArchive + faSysFile + faHidden);
if FindFirst(sDir + '\2005*.*', faAnyFile,sr) = 0 then
begin
repeat
FileSetAttr(sDir + '\'+ sr.Name, FileAttrs);
DeleteFile(sDir + '\'+ sr.Name);
until FindNext(sr) <> 0;
FindClose(sr);
end;
end;