for i:=0 to filelistbox1.Count-1 do begin if(filelistBox1.Selected[i]) then DeleteFile(FileListBox1.Directory+'\'+ FileListBox1.Items[i]); end;
代码是一样一样一样的地:)for i:=0 to filelistbox1.Count-1 do begin if(filelistBox1.Selected[i]) then DeleteFile(FileListBox1.Directory+'\'+ FileListBox1.Items[i]); end;祝:身体健康,答案和分数同样重要 !!!!:)
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 哪不就不对了,怎系办?
if(filelistBox1.Selected[i]) then
DeleteFile(FileListBox1.Directory+'\'+ FileListBox1.Items[i]);
end;
if(filelistBox1.Selected[i]) then
DeleteFile(FileListBox1.Directory+'\'+ FileListBox1.Items[i]);
end;祝:身体健康,答案和分数同样重要 !!!!:)
用户输入的新文件名在:edit1.text里。
假如用户只先了一个文件!
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 哪不就不对了,怎系办?