C
colonel
Unregistered / Unconfirmed
GUEST, unregistred user!
目的是只改变目录列表各扩展名列表,跟据这两个列表去删除文件
Const
DirList = Array [0..1]of string = ('abc', 'aaa');//目录列表
AttrList = Array [0..1]of String = ('*.~*', '*.dcu');//扩展名列表
FileStr = '%s/%s';
var
i,j:Integer;
begin
for i:=Low(Dirlist) to High(Dirlist) do
for j:=Low(AttrList) to High(AttrList) do
deletefile( format(FileStr), [ Dirlist, AttrList[j] ] );//作删除文件操作
end;
Const
DirList = Array [0..1]of string = ('abc', 'aaa');//目录列表
AttrList = Array [0..1]of String = ('*.~*', '*.dcu');//扩展名列表
FileStr = '%s/%s';
var
i,j:Integer;
begin
for i:=Low(Dirlist) to High(Dirlist) do
for j:=Low(AttrList) to High(AttrList) do
deletefile( format(FileStr), [ Dirlist, AttrList[j] ] );//作删除文件操作
end;