procedure DeleteFiles(Path: String);
var
v: Integer;
SRect: TSearchRec;
begin
v := FindFirst(Path + '*.*', faAnyFile, SRect);
while v=0 do
begin
if (SRect.Name <> '.') and (SRect.Name <> '..') then
begin
if (SRect.Attr and faDirectory) = 0 then
DeleteFile(Path + SRect.Name);
end;
v := FindNext(SRect);
end;
FindClose(SRect);
end;
var
v: Integer;
SRect: TSearchRec;
begin
v := FindFirst(Path + '*.*', faAnyFile, SRect);
while v=0 do
begin
if (SRect.Name <> '.') and (SRect.Name <> '..') then
begin
if (SRect.Attr and faDirectory) = 0 then
DeleteFile(Path + SRect.Name);
end;
v := FindNext(SRect);
end;
FindClose(SRect);
end;
解决方案 »
- 如何以流方式在这个记录集结构中加上参数对文件进行操作
- 寻求在Win98及NT(XP,Win2000,Win2003)上读取Bios序列号的方法(不通过注册表方式)
- 跨路由器用ADO连接MSSQL数据库的问题
- Delphi 调用 C 的DLL 问题?高分,在线等!
- 刚做的小程序,请各位帮忙测试一下。
- CheckBox.Checked改变之后,为什么会引发OnClick事件?
- 如何把16位字符串:'1234567890123456'转换为整数(int64)???在线)
- 要在drawgrid的某一指定格里画图,怎么做
- 在Delphi中如何控制 某台打印机的进退纸. 各位龙虾路过进来看看,100大洋不是很多.但却是小弟的一翻心意.
- 数组数据的问题
- delphi5开发接收邮件TNMPOP3,收到的附件ZIP文件打不开,如何解决?
- 关于多媒体控件
DeleteFiles('c:\');