Re: Deleting a file, having problems w compling Programming Software Development by Ancient Dragon …() works something like the dir DOS command. First call FindFirstFile, then if it returns a valid handle create a loop …="http://www.google.com/search?hl=en&q=FindFirstFile&btnG=Google+Search"]google[/URL] And BTW you… Re: FindFirstFile() Programming Software Development by Darth Vader …] folderBrowserDialog1->ShowDialog(); HANDLE h; WIN32_FIND_DATA lpFileName; h = ::FindFirstFile(folderBrowserDialog1->SelectedPath, &lpFileName); // this->textBox1->…quot; in my code.( This Line ) [code] h = ::FindFirstFile(folderBrowserDialog1->SelectedPath, &lpFileName); [/code] [code] WIN32_FIND_DATA ffd… Re: FindFirstFile() Programming Software Development by Ancient Dragon …contains a lot of fields including the filename. Look up FindFirstFile() in MSDN and you will see that that structure contains…. 2. FindFirstFile returns a HANDLE. Setting [icode]this->textBox1->Text… will find a couple very extensive programs that use FindFirstFile() and FindNextFile(). FindFirstFile() Programming Software Development by Darth Vader … know what could be wrong. I am trying to first FindFirstFile() but my compiler doesn´t compile. What could be missing… ? [code] folderBrowserDialog1->ShowDialog(); HANDLE h; WIN32_FIND_DATA lpFileName; h = ::FindFirstFile(folderBrowserDialog1->SelectedPath, &lpFileName); this->textBox1->Text… FindFirstFile() Programming Software Development by darkdai hey everyone, i was wondering if anyone can tell me how to prompt the user the enter the filename to be searched for using FindFirstFile. and if there a way of setting a default path to search in Re: FindFirstFile() Programming Software Development by WaltP Output a prompt asking for filename Input as string Use the string in [iCODE]FindFirstFile()[/iCODE] as per the definition of the function. Re: FindFirstFile() Programming Software Development by darkdai but with the FindFirstFile() function, on you are supposed to enter the the path and the filename of which you are going to search for, so how can you icnlude both of those together in one? Re: FindFirstFile() Programming Software Development by Ancient Dragon If you enter *.* from the keyboard then just concantinate the two strings. Simple. [code] char path[255] = {"c:\\myfolder\\}; char file[] = "*.*'; strcat(path,file); FindFirstFile(path, ...); [/code] Re: FindFirstFile() Programming Software Development by darkdai …\\"}; char filename[30]="*.*"; strcat(path,filename); hFind = FindFirstFile(path, &FindFileData); [/CODE] but i get an error that… Re: FindFirstFile() Programming Software Development by Ancient Dragon You are compiling for UNICODE. Either turn UNICODE off or make the string literals UNCODE compatible. [code] #include <tchar.h> ... <snip> TCHAR path[260]={_TEXT("C:\\Users\\")}; TCHAR filename[30]=_TEXT("*.*"); _tcscat(path,filename); hFind = FindFirstFile(path, &FindFileData); [/code] findfirstfile Programming Software Development by CreatorZeus … worked out. annnnnnnnnnnnnd code snippet: ` WIN32_FIND_DATA FindFileData; HANDLE hFind; hFind = FindFirstFile(_T"C:\\Dev-Cpp\\notes", &FindFileData); if… Re: findfirstfile Programming Software Development by deceptikon … in old fasion way! You mean `errno.h`? `_stat` and `FindFirstFile` are both C-based API functions, so errno and return… FindFirstFile & FindNextFile return extra files? Programming Software Development by bronzefury …search string by passing [I]C:\*bc*[/I] to FindFirstFile(). The program attaches the asterisks at the beginning and …end of the Search String. FindFirstFile and FindNextFile returns many files that contain the letters &… indicate which function call found that file, either FindFirstFile() or FindNextFile(). bronzefury FindFirstFile() giving error "The request is not supported." in Windows 7 Programming Software Development by harish_s …a directory of Solaris OS from Windows OS using FindFirstFile(). In Windows XP, the code is working …but in Window 7 same code is not working. FindFirstFile() returns INVALID HANDLE in Windows 7 and GetLastError()…CODE] It works fine in XP but in Windows 7 FindFirstFile() returns INVALID_HANDLE_VALUE and then GetLastError() reports Error Code 50.… FindFirstFile() giving error "The request is not supported." in Windows 7 Hardware and Software Microsoft Windows by harish_s … open a directory of Solaris OS from Windows OS using FindFirstFile(). In Windows XP, the code is working fine but in… Window 7 same code is not working. FindFirstFile() returns INVALID HANDLE in Windows 7 and GetLastError() return error… findFirstFile() in c# Programming Software Development by saneeha I am converting a code from c++ to c#. The code uses the function findFirstFile() to return the first file of the directory.. Is this function present in c#, or there are any modifications to the function..The function uses a header windows.h. What is its replacement in c#? MSDN has no example for this function in c# .. plz help..... Re: findFirstFile() in c# Programming Software Development by dickersonka ddanbe gave the way c# does it, i would suggest to stay with some modification of that, try to stick with what the language gives you if its possible, rather than trying to mimic c++ here is an article the has an implementation of findfirstfile in c# [url]http://www.codeproject.com/KB/files/FileSystemEnumerator.aspx[/url] FindFirstFile error code Programming Software Development by techmaddy hi, I am using FindFirstFile() and some times it is setting a error code of 317 (ERROR_MR_MID_NOT_FOUND 317 (0x13D)) Can anybody let me know what could be the reasons behind such an error. Thanks in Advance, Madhu FindFirstFile Not working properly Programming Software Development by duliduli556 Hi Guys I am trying to read contents of directory... using "FindNextFile(hFind, &FindFileData)" Findfirstfile returned me then first file in the directory.. even though I have somany files in the directory (FindNextFile(hFind, &FindFileData) returning me zero..... can anyone help me... thanks in advance... Thanks WINAPI FindFirstFile & FindNextFile problem Programming Software Development by k_nenad … CharSet = CharSet.Auto)] public static extern IntPtr FindFirstFile(string lpFileName, out WIN32_FIND_DATA lpFindFileData); [DllImport("…GetCurrentDirectory()); WIN32_FIND_DATA wfd = new WIN32_FIND_DATA(); IntPtr h = FindFirstFile((dir + @"\*.*"), out wfd); while (FindNextFile(… Win32_FIND_DATA FindFirstFile Programming Software Development by princess_lia …[B]lstrcpy (sDirectory, "264\\*.264"); hSearch = FindFirstFile(sDirectory, &FindFileData);[/B] if (hSearch == INVALID_HANDLE_VALUE) { …quot;, GetLastError()); exit(1); } } ------------------------------------------------------------------------- As "FindFirstFile" is not picking the complete filename, but just … need FindFirstFile in linux!!!! Hardware and Software Linux and Unix by nabilchampion … windows to linux box..n i just encountered a function findfirstfile() used in windows..this function also takes wildcards as regular… in linux then plz let me know... u can search findfirstfile() detail in MSDN code for findfirstfile! Programming Software Development by nabilchampion … windows to linux box..n i just encountered a function findfirstfile() used in windows..this function also takes wildcards as regular… in linux then plz let me know... u can search findfirstfile() detail in MSDN:icon_mrgreen: Get path to file found by FindFirstFile Programming Software Development by praetorian20 Hi, I'm using FindFirstFile and FindNextFile functions to get a list of files from … 'subDir1\*' as the input argument I know how to use FindFirstFile and FindNextFile to get 'file1.txt' but I also need… Re: C - WINAPI - FindFirstFile retruns "." Programming Software Development by MonsieurPointer … I can still pitch in and help. After a FindFirstFile, FindNextFile is usually called in a loop, but only… if FindFirstFile does not return INVALID_HANDLE_VALUE. Once you are done, you…will need to close the handle with FindClose. When using FindFirstFile to search for directories, the first result is always … Re: need FindFirstFile in linux!!!! Hardware and Software Linux and Unix by nabilchampion i also need support for regular expressions in the alternate function as does findfirstfile() ! Re: code for findfirstfile! Programming Software Development by nabilchampion well thnx to all of u... i found a function fnmatch() that solved my problem for now ..i wrote an alternate findfirstfile() in linux using scandir() and fnmatch() functions. C - WINAPI - FindFirstFile retruns "." Programming Software Development by daveoffy … *filepath; char *foldername; //...Other Code Here to set filepath hFind = FindFirstFile(filepath, &FindProfileName); if (FindProfileName.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { FindClose(hFind… Reading files in a certain directory Programming Software Development by Fouly … "\\"; strPattern = refcstrRootDirectory + "\\*.*"; hFile = ::FindFirstFile(strPattern.c_str(), (&FileInformation)); if(hFile != INVALID_HANDLE_VALUE) { do {…] but i got the following error: [code] hFile = ::FindFirstFile(strPattern.c_str(), (&FileInformation)); [/code] Error 4 error C2664… Finding the most recently created file in a folder Programming Software Development by iluv2laugh … FILETIME maxCreationTime; maxCreationTime.dwLowDateTime=0; maxCreationTime.dwHighDateTime=0; hFind = FindFirstFile((LPCWSTR)filePattern, &ffd); if (INVALID_HANDLE_VALUE == hFind) { …cannot be passed the search file handle returned bu FindFirstFile()/FindNextFile()? Any thoughts on how I can use …