Here is something that u can do w/o using MFC or FindFileFirst
//***** START OF UR PROGRAM *****
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <iostream.h>
//main(int argc, char *argv[]) -- original
int main()
{
char *instruction;
char path[50], filename[15];
//long *instruction;
cout << "Enter Drive or path that you want (ie. c: or c:\\mypath):\t";
cin >> path;
cout <<"File name (ie. myfile.txt)\t";
cin >> filename;
cout <<"\n";
if (path== NULL || filename == NULL)
{
printf("\nYou miss path or filename\n\n"

;
printf(" Drive/Path it is the drive/path in which you want\n"

;
printf("to search for your file or directory.\n"

;
printf(" filename : it is the name of the file (or part of\n"

;
printf("the name) or of the directory that you\n"

;
printf("are searching for.\n\n"

;
return -1;
}
instruction = (char *)calloc(101, sizeof(char));
strcat(instruction, "dir "

;
strcat(instruction, path);
strcat(instruction, "\\"

;
strcat(instruction, filename);
strcat(instruction, " /s /l /b > outdir.txt"

; // dd
printf("%s \n", instruction);
system(instruction);
return 0;
}
//****END OF UR PROGRAM
Let me know if u have any issue
Hope this helps
GH