31.03.2011, 10:53
|
|
Always hardcore!
|
|
Регистрация: 04.03.2009
Адрес: СПб
Сообщения: 3,239
Версия Delphi: GCC/FPC/FASM
Репутация: 62149
|
|
Код:
function FileCount(Dir: string): integer; forward;
...
function FileCount(Dir: string): integer;
var
fs: TSearchRec;
begin
Result := 0;
if FindFirst(Dir + '\*.exe', faAnyFile, fs) = 0 then repeat
inc(Result);
until FindNext(fs) <> 0;
FindClose(fs);
if FindFirst(Dir + '\*', faDirectory, fs) = 0 then repeat
if fs.name[1] <> '.' then begin
inc(Result,FileCount(Dir+fs.name));
end;
until FindNext(fs) <> 0;
FindClose(fs);
end;
__________________
Оставайтесь хорошими людьми...
VK id2634397, ds [at] phoenix [dot] dj
|