如上
解决方案 »
- 帮忙看一下错误在哪里
- 如果获得由WinExec提交过来的启动参数?
- delphi目前还有多少竞争力
- 如何读取指针数组中的某个值?
- delphi中可以有私有构造函数吗?
- intraweb 用ado连接数据库 ,调试执行时提示如下错误:access violation 错误。代码如下:
- 请问大家一个delphi中控件用法的问题
- dbgrid选中的问题?在线及等!!!!!
- 散分喽。。。。。
- 我在Delphi中的控件栏中新添一flatstyle栏目,但不能用不知什么原因.
- 请教各位大哥,一个很奇怪的错误,(我怎么也找不出原因),谢谢!
- 我只想好好用 Delphi2005 ,请大家帮帮忙,是我不对,还是Delphi2005的BUG!
var
sr:TSearchRec;
sPath,sFile: String;
begin
if Copy(sDirectory,Length(sDirectory),1) <> '\' then
sPath := sDirectory + '\'
else
sPath := sDirectory; if SysUtils.FindFirst(sPath+'*.*',faAnyFile, sr) = 0 then
begin
repeat
sFile:=Trim(sr.Name);
if sFile='.' then Continue;
if sFile='..' then Continue; sFile:=sPath+sr.Name;
if (sr.Attr and faDirectory)<>0 then
Fun_DeleteDir(sFile)
else
if (sr.Attr and faAnyFile) = sr.Attr then
begin
try
DeleteFile(PAnsiChar(sFile)); //删除文件
except
;
end;
end;
until SysUtils.FindNext(sr) <> 0;
SysUtils.FindClose(sr);
end;
try
RemoveDir(sPath);
except
;
end;
end;