예전에 답변들였던건데요.
급하다니 그냥 복사해 드립니다
--------------------------------------------
안창기 wrote:
////////////////////////////////////////////
아래것을 참조해보세요
유닛에 FileCtrl를 추가선언하구요
var
DirInfo: TSearchRec;
r : Integer;
Dir_Name : string;
begin
Dir_Name := '디렉토리전체';
if DirectoryExists(Dir_Name)then begin
r := FindFirst(Dir_Name +'*.*', FaAnyfile, DirInfo);
While r = 0 do begin
if ((DirInfo.Attr and FaDirectory <> FaDirectory) and (DirInfo.Attr and FaVolumeId <> FaVolumeID)) then
DeleteFile(pChar(Dir_Name +'' + DirInfo.Name));
r := FindNext(DirInfo);
end;
SysUtils.FindClose(DirInfo);
//RemoveDirectory(PChar(Dir_Name));//디렉토리삭제
end;
end;
급하다니 그냥 복사해 드립니다
--------------------------------------------
안창기 wrote:
////////////////////////////////////////////
아래것을 참조해보세요
유닛에 FileCtrl를 추가선언하구요
var
DirInfo: TSearchRec;
r : Integer;
Dir_Name : string;
begin
Dir_Name := '디렉토리전체';
if DirectoryExists(Dir_Name)then begin
r := FindFirst(Dir_Name +'*.*', FaAnyfile, DirInfo);
While r = 0 do begin
if ((DirInfo.Attr and FaDirectory <> FaDirectory) and (DirInfo.Attr and FaVolumeId <> FaVolumeID)) then
DeleteFile(pChar(Dir_Name +'' + DirInfo.Name));
r := FindNext(DirInfo);
end;
SysUtils.FindClose(DirInfo);
//RemoveDirectory(PChar(Dir_Name));//디렉토리삭제
end;
end;
hsr////////////////////////////////////////////////////////////////