Click here to Skip to main content
15,923,087 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow can I search a file without extension Pin
19-Jul-01 10:51
suss19-Jul-01 10:51 
AnswerRe: how can I search a file without extension Pin
Carlos Antollini19-Jul-01 11:01
Carlos Antollini19-Jul-01 11:01 
GeneralRe: how can I search a file without extension Pin
19-Jul-01 11:36
suss19-Jul-01 11:36 
GeneralRe: how can I search a file without extension Pin
Carlos Antollini19-Jul-01 11:45
Carlos Antollini19-Jul-01 11:45 
GeneralRe: how can I search a file without extension Pin
19-Jul-01 12:03
suss19-Jul-01 12:03 
GeneralRe: how can I search a file without extension Pin
Carlos Antollini19-Jul-01 12:13
Carlos Antollini19-Jul-01 12:13 
GeneralRe: how can I search a file without extension Pin
Steve T19-Jul-01 12:38
Steve T19-Jul-01 12:38 
GeneralRe: how can I search a file without extension Pin
Ben Burnett19-Jul-01 11:48
Ben Burnett19-Jul-01 11:48 
>> ......how to get rid of those directory.....

use the IsDots and IsDirectory members.

>> ...to list files in particular directory

CString extension = "*.*";<br />
CString filepath = "C:\ABC\";<br />
<br />
BOOL haveFile = finder.FindFile ( filepath + extension );<br />
<br />
while ( haveFile ) {<br />
<br />
haveFile = finder.FindNextFile();<br />
<br />
// skip directories<br />
if ( finder.IsDots () || finder.IsDirectory () ) continue;<br />
<br />
//<br />
// do something with the file<br />
//<br />
<br />
}


-Ben

---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic" Wink | ;)
AnswerRe: how can I search a file without extension Pin
Steve T19-Jul-01 12:10
Steve T19-Jul-01 12:10 
GeneralSimple variable question. Pin
John Uhlenbrock19-Jul-01 10:10
John Uhlenbrock19-Jul-01 10:10 
GeneralRe: Simple variable question. Pin
Carlos Antollini19-Jul-01 10:33
Carlos Antollini19-Jul-01 10:33 
QuestionPointers anyone? Pin
Frank Deo19-Jul-01 9:48
Frank Deo19-Jul-01 9:48 
AnswerRe: Pointers anyone? Pin
Ben Burnett19-Jul-01 11:54
Ben Burnett19-Jul-01 11:54 
GeneralRe: Pointers anyone? Pin
Frank Deo19-Jul-01 12:13
Frank Deo19-Jul-01 12:13 
GeneralRe: Pointers anyone? Pin
Christian Graus19-Jul-01 12:27
protectorChristian Graus19-Jul-01 12:27 
GeneralRe: Pointers anyone? Pin
Frank Deo19-Jul-01 12:38
Frank Deo19-Jul-01 12:38 
GeneralRe: Pointers anyone? Pin
Christian Graus19-Jul-01 12:50
protectorChristian Graus19-Jul-01 12:50 
GeneralRe: Pointers anyone? Pin
Frank Deo19-Jul-01 13:04
Frank Deo19-Jul-01 13:04 
GeneralRe: Pointers anyone? Pin
Christian Graus19-Jul-01 13:11
protectorChristian Graus19-Jul-01 13:11 
GeneralRe: Pointers anyone? Pin
Frank Deo19-Jul-01 13:25
Frank Deo19-Jul-01 13:25 
GeneralRe: Pointers anyone? Pin
Mike Burston19-Jul-01 13:19
Mike Burston19-Jul-01 13:19 
GeneralRe: Pointers anyone? Pin
Frank Deo19-Jul-01 13:27
Frank Deo19-Jul-01 13:27 
QuestionIs it impossible that exe file will return a value ??? Pin
19-Jul-01 9:02
suss19-Jul-01 9:02 
AnswerRe: Is it impossible that exe file will return a value ??? Pin
Michael Dunn19-Jul-01 9:42
sitebuilderMichael Dunn19-Jul-01 9:42 
GeneralRadio Buttons Pin
19-Jul-01 8:57
suss19-Jul-01 8:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.