Subj : sweep To : Eddy Thilleman From : Lesha Tsoorgaev Date : Mon Mar 19 2001 03:55 am Hello Eddy, On 15/Mar/01 at 11:55 you wrote: ET>>>> Borland Pascal as DOS .EXE file and compiled it with Virtual ET>>>> Pascal/2 v2.1 build 243 as OS/2 .EXE file, and implemented it ET>>>> also in REXX. ET> FindFirst('*', Directory, DR); ET> while (DosError = 0) do ET> begin ET> if (DR.Attr and Directory) = Directory then ET> begin ET> if ((DR.Name <> '.') and (DR.Name <> '..')) then ET> begin ET> ChDir( DR.Name ); ET> AllDirs; ET> ChDir( '..' ); ET> end ET> end; ET> FindNext( DR ); ET> end; ET> Call SysFileTree path || "\*", 'dir', 'D' ET> if datatype( dir.0 ) <> "NUM" then dir.0 = 0 ET> do f = 1 to dir.0 ET> name = substr( dir.f, 38 ) ET> if (substr( dir.f, 32, 1 ) = 'D') then /* directory? */ ET> call Exec( name ) ET> end ET> The DOS pascal version is equally fast as the REXX version, the ET> OS/2 VP/2 version is slower (as I said). I think it is possible, that SysFileTree and OS/2 DOS support are simply caching directory search and do not call DosFindFirst/DosFindNext for every filename. These functions allow to request information about ~64K filenames at once, and IMHO this can result in speeding up the process greately. While SysFileTree is obviously must use such a technique, I am in doubt if OS/2 DOS support does so actually. Try to replace running external programs with somewhat fast enough (may be without any output) to figure out if the main brake is FindFirst/FindNext or not. Cheers, \Lesha --- MadMED v0.42i/OS2 (Apr 25 1997 15:17:26) * Origin: HDD2G/HPFS+HDD32M/RT-11 (2:5020/1613) .