在DELPHI6.0中filelistbox1列出目录中的文件。现要将用户选择( 可多选)的文件册除如何写??

解决方案 »

  1.   

    for i:=0 to filelistbox1.Count-1 do begin
       if(filelistBox1.Selected[i]) then 
          DeleteFile(FileListBox1.Directory+'\'+ FileListBox1.Items[i]);
    end;
      

  2.   

    代码是一样一样一样的地:)for i:=0 to filelistbox1.Count-1 do begin
       if(filelistBox1.Selected[i]) then 
          DeleteFile(FileListBox1.Directory+'\'+ FileListBox1.Items[i]);
    end;祝:身体健康,答案和分数同样重要 !!!!:)
      

  3.   

    谢谢,通过了。不知在DELPHI6.0中filelistbox1列出目录中的文件。现要将用户选择的文件"改名",如何写??
    用户输入的新文件名在:edit1.text里。
      

  4.   

    TO:ghyghost(著名关心CSDN结贴率爱国主义人士代表) ,我会结贴的!
    假如用户只先了一个文件!
    for i:=0 to filelistbox1.Count-1 do begin
       if(filelistBox1.Selected[i]) then 
          rename(FileListBox1.Directory+'\'+ FileListBox1.Items[i]
    ,FileListBox1.Directory+'\'+edit1.text);
    end;
    改名在同一目录,这样不行呀!如果选的是a.txt,输入的新名是:b.att 哪不就不对了,怎系办?