谢谢

解决方案 »

  1.   

    这个是在ListBox中选择要删除的文件夹,然后删除。procedure TForm8.Button1Click(Sender: TObject);
    var
      j:integer;
      s:string;
      FSearchRec:TSearchRec;
      FindResult:ShortInt;
    begin
      for j:=1 to ListBox1.Count-1 do
        if ListBox1.Selected[j] then
          begin
            s:=ExtractFilePath(ParamStr(0))+'Temp\'+ListBox1.Items[j]+'\';
            FindResult:=FindFirst(s+'*.*',faAnyFile,FSearchRec);
            try
              while FindResult=0 do
                begin
                  DeleteFile(s+FSearchRec.Name);
                  FindResult:=FindNext(FSearchRec);
                end;
            finally
              FindClose(FSearchRec);
            end;
            RemoveDir(s);
          end;
      ListBox1.Clear;
      ListBox1.Items.Add(ExtractFilePath(ParamStr(0))+'Temp\');
      FindFiles(ExtractFilePath(ParamStr(0))+'Temp\');
      if RadioGroup1.ItemIndex=0 then
        SelectDateDir(15)
      else
        SelectDateDir(30);
    end;
      

  2.   

    记住,名字最好都是英文。
    包括这个文件夹的路径。
    有中文就不能用deletefile函数了,可能要用WinAPI中的删除函数。
    我没时间试,有时间可以试一下。
      

  3.   

    偶现在很穷,挣分结贴 偶现在很穷,挣分结贴 偶现在很穷,挣分结贴到论坛去看一看
    http://www.envanet.com
    我的论坛,这样说是不是有拉条皮的嫌疑
    不过我确实放了很多高程考试的资料在上面
    好的话,给点分支持一下