Article View: borland.public.cppbuilder.nativeapi
Article #1003Re: find .exe's
From: JohnC
Date: Tue, 30 Oct 2007 22:17
Date: Tue, 30 Oct 2007 22:17
16 lines
1586 bytes
1586 bytes
Have you tried something along these lines?
WinExec("cmd /c \"dir *.exe /s > test.txt\"", SW_HIDE);
John
"mataus" <mataus@gmail.com> wrote in message
news:4727891b$1@newsgroups.borland.com...
> Hi all,
>
> I need code to find all .exe file on a disk. I use FindFirstFile /
> FindNextFile and it works but it seems slow. When i run code its time is
> long (1 min 30 secs for ~2500 files on T60 thinkpad ). However, if i use
> command line cmd->dir *.exe /s - time is fast (10 secs for ~2500 on T60).
> Can anyone help me make this fast?
>
Technical Details
Message-ID:
<4727ad98$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!83.80.28.12.MISMATCH!multikabel.net!newsfeed10.multikabel.net!xlned.com!feeder1.xlned.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4727891b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,52a2861022dfbb0b X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "JohnC" <jcibulskis@sbcglobal.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <4727891b$1@newsgroups.borland.com> Subject: Re: find .exe's Date: Tue, 30 Oct 2007 17:17:59 -0500 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 76.223.245.175 Message-ID: <4727ad98$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1193782680 76.223.245.175 (30 Oct 2007 15:18:00 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!83.80.28.12.MISMATCH!multikabel.net!newsfeed10.multikabel.net!xlned.com!feeder1.xlned.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail