Zna li iko zasto???
CODEEE....
--------------------------------------------
procedure DoFile(Path, AFileName: string);
begin
//ovde postaviti kod shta da se radi sa svakim fajlom
// na pr. ListBox1.Add(AFileName) or whatever
Form1.ListBox1.Items.Add(AFileName);
end;
procedure ProcessDir(Path: string; Maska: String);
var sr:TSearchRec;
SearchPath:string;
begin
//Prvo direktorijume, posle ostalo
try
if Copy(Path,Length(Path),20)<>'\' then Path:=Path+'\'; SearchPath:=Path+'*.*';
if FindFirst(SearchPath,faDirectory,sr)=0 then begin
repeat
if ((sr.Attr and faDirectory)=sr.Attr) and (sr.Name<>'.') and
(sr.Name<>'..') then
ProcessDir(Path+sr.Name, Maska);
until FindNext(sr)<>0;
end;
except
end;
// Procesiraj Fajlove
SearchPath:=Path+Maska;
if FindFirst(SearchPath,faAnyFile,sr)=0 then begin
DoFile(Path,sr.FindData.cFileName);
Application.ProcessMessages;
while FindNext(sr)=0 do DoFile(Path, sr.FindData.cFileName);
end;
// CleanUp
FindClose(sr);
end;
//Samo pozovesh ProcessDir('D:\','*.mp3') i gotovo...
//Mozhesh pogledati i u helpu o FindFirst, FindNext i sl..
--------------------------------------------
END CODEE
Ako se na ovaj nacin ne moze odraditi posao... sta bih drugo mogao uraditi.
al ne znam zbog čega
sve dobija drugu boju i miris
koliko puta sam krenuo iz početka
i stigao do istog prokletog mesta ...