文件都是按照日期来命名的,例如
20050101.txt
20050102.txt
...
20050727.txt
20050728.txt
20050729.txt
我想批量删除从20050501.txt-20050630.txt
如何操作啊??谢谢拉

解决方案 »

  1.   

    1)可以考虑使用ShFileOperation的
    支持通配符的,但这里也不好把握
    2)Format/FormatDateTime建立格式为yyyymmdd的,然后DeleteFile的_____________________
    comment by Liu Yang
    http://lysoft.7u7.net
    QQ Group: 7858482
      

  2.   

    deletefile好象不支持通配符,如果支持通配符就好了,大峡们赐教啊!
      

  3.   

    to ly_liuyang(Liu Yang):
      你的群满员鸟...........
      

  4.   

    var
      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;