현재 디렉토리에 있는 모든 파일검사는 FIndfirst, findNext로 하는건 알겠는데
현재 디렉토리내에 있는 모든 디렉토리를 검사하려면 어떻게 해야하는지 모르겠습니다.
혹시 아시는분.은 좀 가르쳐주세요..
if FindFirst(CurrentDir+'*.*',faAnyFile, sr) = 0 then 이거대신
var
Attr :integer
if FindFirst(CurrentDir,Attr, sr) = 0 then begin 이걸루 해봤는데도
잘안되는군요.
그럼..
똑같이 하셔두 되구 검색속성만 바꾸셔두 되는데요...
if FindFirst(CurrentDir+'*.*',faAnyFile, Sr) = 0 then
begin
repeat
if (SR.Attr and faDirectory) <> 0 then
if (SR.Name[1] <> '.') then
ShowMessage(SR.Name);
until FindNext(SR) <> 0;
end;
FindClose(SR);
-------------------------------------------------
if FindFirst(CurrentDir+'*.*',faDirectory, Sr) = 0 then
begin
repeat
if (SR.Name[1] <> '.') then
ShowMessage(SR.Name);
until FindNext(SR) <> 0;
end;
FindClose(SR);
^^ 항상 즐코하세요...
델초보 wrote:
> 현재 디렉토리에 있는 모든 파일검사는 FIndfirst, findNext로 하는건 알겠는데
> 현재 디렉토리내에 있는 모든 디렉토리를 검사하려면 어떻게 해야하는지 모르겠습니다.
> 혹시 아시는분.은 좀 가르쳐주세요..
>
> if FindFirst(CurrentDir+'*.*',faAnyFile, sr) = 0 then 이거대신
>
> var
> Attr :integer
>
> if FindFirst(CurrentDir,Attr, sr) = 0 then begin 이걸루 해봤는데도
> 잘안되는군요.
> 그럼..
>