for i := 0 to (Filelistbox.count-1) do begin FileListBox.FileName[i] := FileListBox.FileName[i]+inttostr(i) end; 没有用过filelistbox,可能这样应该可以。
procedure TForm1.Button2Click(Sender: TObject); var i:integer; old,new:string; begin for i:=0 to (filelistbox1.Count-1) do old:=filelistbox1.FileName; showmessage(old); new:=filelistbox1.FileName+inttostr(i)+'xxx'; If RenameFile(old,new)=true thenfilelistbox1.Update else showmessage('有重名文件');end; end.我是这样写的但是也不行 help
begin
FileListBox.FileName[i] := FileListBox.FileName[i]+inttostr(i)
end;
没有用过filelistbox,可能这样应该可以。
var
i:integer;
old,new:string;
begin
for i:=0 to (filelistbox1.Count-1) do
old:=filelistbox1.FileName;
showmessage(old);
new:=filelistbox1.FileName+inttostr(i)+'xxx';
If RenameFile(old,new)=true thenfilelistbox1.Update
else
showmessage('有重名文件');end;
end.我是这样写的但是也不行
help