Click here to Skip to main content
15,897,891 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do I Pin
Christian Graus23-May-04 13:49
protectorChristian Graus23-May-04 13:49 
AnswerRe: How do I Pin
V.24-May-04 0:11
professionalV.24-May-04 0:11 
GeneralWIN32_FIND_DATA help Pin
Ryan McDermott23-May-04 12:36
Ryan McDermott23-May-04 12:36 
GeneralRe: WIN32_FIND_DATA help Pin
Joe Woodbury23-May-04 13:13
professionalJoe Woodbury23-May-04 13:13 
GeneralRe: WIN32_FIND_DATA help Pin
Ryan McDermott23-May-04 13:23
Ryan McDermott23-May-04 13:23 
GeneralRe: WIN32_FIND_DATA help Pin
Joe Woodbury23-May-04 13:35
professionalJoe Woodbury23-May-04 13:35 
GeneralRe: WIN32_FIND_DATA help Pin
Ryan McDermott23-May-04 14:18
Ryan McDermott23-May-04 14:18 
GeneralRe: WIN32_FIND_DATA help Pin
Joe Woodbury23-May-04 15:22
professionalJoe Woodbury23-May-04 15:22 
It doesn't search for folders which contain part of a string, it recursively looks for folders which ARE a specified string starting from the current directory, which is what the original poster was looking for. I never said otherwise. It is your job to modify the source for your own use.

If you modify the "else if" section in "walk" to the following:

else if (!IsDots(findData.cFileName))
{
    ::SetCurrentDirectory(findData.cFileName);

    TCHAR path[260];
    ::GetCurrentDirectory(sizeof(path) / sizeof(TCHAR), path);
    _tprintf(_T("Changing to: %s\n"), path);

    foundDir = Walk(pDirToFind, pFinalPath);
    ::SetCurrentDirectory(_T(".."));
}


Then add:

::SetCurrentDirectory(_T("\\"));


in main() just after the first if() section, it will search the entire drive, displaying the directories recursed, until it finds the directory MATCHING that from the command line.

If this doesn't work for you, you are compiling and/or running it incorrectly. You are also making no effort to determine why it isn't performing as you expected.

Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke

GeneralRe: WIN32_FIND_DATA help Pin
Ryan McDermott23-May-04 15:25
Ryan McDermott23-May-04 15:25 
GeneralRe: WIN32_FIND_DATA help Pin
Michael Dunn23-May-04 16:31
sitebuilderMichael Dunn23-May-04 16:31 
GeneralRe: WIN32_FIND_DATA help Pin
Ryan McDermott23-May-04 16:39
Ryan McDermott23-May-04 16:39 
GeneralRe: WIN32_FIND_DATA help Pin
Michael Dunn23-May-04 16:45
sitebuilderMichael Dunn23-May-04 16:45 
GeneralRe: WIN32_FIND_DATA help Pin
Ryan McDermott23-May-04 16:48
Ryan McDermott23-May-04 16:48 
QuestionIn MFC, which event works when user clicks on close button? Pin
ayca23-May-04 11:29
ayca23-May-04 11:29 
AnswerRe: In MFC, which event works when user clicks on close button? Pin
Gary R. Wheeler23-May-04 12:11
Gary R. Wheeler23-May-04 12:11 
AnswerRe: In MFC, which event works when user clicks on close button? Pin
Curi0us_George23-May-04 12:24
Curi0us_George23-May-04 12:24 
GeneralRe: In MFC, which event works when user clicks on close button? Pin
ayca25-May-04 6:03
ayca25-May-04 6:03 
GeneralRe: In MFC, which event works when user clicks on close button? Pin
Curi0us_George25-May-04 6:22
Curi0us_George25-May-04 6:22 
AnswerRe: In MFC, which event works when user clicks on close button? Pin
Joe Woodbury23-May-04 13:15
professionalJoe Woodbury23-May-04 13:15 
AnswerRe: In MFC, which event works when user clicks on close button? Pin
Blake Miller25-May-04 15:28
Blake Miller25-May-04 15:28 
GeneralRe: In MFC, which event works when user clicks on close button? Pin
ayca26-May-04 12:01
ayca26-May-04 12:01 
GeneralAqua Pin
TrungHuynh23-May-04 11:28
TrungHuynh23-May-04 11:28 
GeneralRe: Aqua Pin
l a u r e n23-May-04 13:44
l a u r e n23-May-04 13:44 
GeneralRe: Aqua Pin
Michael Dunn23-May-04 16:33
sitebuilderMichael Dunn23-May-04 16:33 
GeneralMFC listbox usage Pin
kfaday23-May-04 10:50
kfaday23-May-04 10:50 

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.