procddure IsDirNotation(DirName: String): Boolean;<br>begin<br> Result := (DirName = '.') or (DirName = '..');<br>end;<br><br>ResRec: TSearchRec;<br><br>FindResult := FindFirst(Path + '*.*', faDirectory, ResRec); <br>ResRec包含目录信息<br><br>while FindResult = 0 do<br>begin<br> if ((ResRec.Attr and faDirectory) = faDirectory) and not<br> IsDirNotation(ResRec.Name) //判断不为'.','..'子目录<br> then<br> //do your job.<br> FindResult := FindNext(ResRec);<br>end;<br><br><br>