Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

How? Find similar branches


Xtorm   (2001-12-19 10:40) [0]

How to get the entire list of files and folders is allowed on disk with: \
only without the help of components ???



Bizon   (2001-12-19 10:46) [1]

Use the FindFirst & FindNext files



Dimka Maslov   (2001-12-19 10:52) [2]

procedure FindFiles (Path, Mask: string; List: TStrings; IncludeSubDir: Boolean = True); var SearchRec: TSearchRec; FindResult: Integer; begin List.BeginUpdate; try Path: = IncludeTrailingBackSlash (Path); FindResult: = FindFirst (Path + "*. *", FaAnyFile, SearchRec); try while FindResult = 0 do with SearchRec do begin if (Attr and faDirectory <> 0) then begin if IncludeSubDir and (Name <> "..") and (Name <> ".") then FindFiles (Path + Name, Mask, List, IncludeSubDir); end else begin if MatchesMask (Name, Mask) then List.Add (Path + Name); end; FindResult: = FindNext (SearchRec); end; finally FindClose (SearchRec); end; finally List.EndUpdate; end; end;



cpp   (2001-12-19 10:53) [3]

Here and my source can customize

procedure ReadAllFiles (DirFrom: string);
var SearchRecOtkuda: TSearchRec;



procedure ReadFile (FileName: string);
begin
// what we want and do with the file
end;

procedure ReadDir (DirName: string);
begin
// what we want and do with the directory
if (DirName <> ".") and (DirName <> "..") then
begin
ReadAllFiles (DirFrom + "\" + DirName);
end;
end;

begin
if FindFirst (DirFrom + "\ *. *", faAnyFile, SearchRecOtkuda) = 0 then
begin
if (faDirectory and SearchRecOtkuda.Attr)> 0 then
ReadDir (SearchRecOtkuda.Name)
else
ReadFile (SearchRecOtkuda.Name);
while FindNext (SearchRecOtkuda) = 0 do
begin
if (faDirectory and SearchRecOtkuda.Attr)> 0 then
ReadDir (SearchRecOtkuda.Name)
else
ReadFile (SearchRecOtkuda.Name);
end;
end;
end;



Xtorm   (2001-12-19 11:39) [4]

THANKS Everyone, everything is working now !!!!



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top





Memory: 0.55 MB
Time: 0.035 c
7:22440
Rumrunner
2001-05-13 00:32
2002.01.08
Win98 has the ability to allow Internet sharing for the local network.


4:22482
PONTIY
2001-11-01 10:06
2002.01.08
WinExec or ShellExecute


3:21901
Victor
2001-12-06 09:46
2002.01.08
problem with deleting records


7:22423
Alex_K_xelA
2001-09-21 18:55
2002.01.08
Reading sectors from a CD-ROM


4:22509
Karan
2001-11-08 12:50
2002.01.08
GetkeyboardState- What does?





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Spanish swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish