 |
Club Builder Foro de C++Builder en español
|
| Ver tema anterior :: Ver tema siguiente |
| Autor |
Mensaje |
M1k3 Invitado
|
Publicado: Vie 06 Ago, 2004 1:46 am Asunto: Recursively open files |
|
|
Hi!:
I need 2 open recursiverly some files stored on my HDD (*.htm or *.html) I need 2 process them (that part it's already solved) but now I need 2 do it recursively but automatically...
So... any idea??
READ YA
M1k3
 |
|
| Volver arriba |
|
 |
M1k3 Invitado
|
Publicado: Dom 08 Ago, 2004 8:36 pm Asunto: Posible solución a mi problema, pero necesito + ... |
|
|
Encontré una función q' se llama FindFirstFile, pero no C q' onda con el segundo parámetro de esta función...
HANDLE FindFirstFile(
LPCTSTR lpFileName, // pointer to name of file to search for
LPWIN32_FIND_DATA lpFindFileData // pointer to returned information
);
el parámetro es una estructura llamada WIN32_FIND_DATA pero no C si tengo q' usar todos los campos de esta estructura... |
|
| Volver arriba |
|
 |
M1k3 Invitado
|
Publicado: Mar 10 Ago, 2004 5:22 pm Asunto: Solution...... |
|
|
OK... thanx 2 those who help me 2 solve this.... Hmmm... wait no body helped me ok, here's the answer 4 those who R interested
The functions that solve it R FindFirstFile, FindNextFile & 2 close it FindClose... (they R in the windows SDK help files)
The usage....
First U've 2 define a structure or a variable that belongs 2 some structure that's already pre-defined
WIN32_FIND_DATA FN;
FindFirstFile("*.htm", &FN); // Here I define first the type of files I'm lookin' 4 & then call the variable that will hold the data from the first file found
strcpy (str, FN.cFileName); //The FN structure has several fields this is one (cFileName)
if (str)
{
apunt=fopen(str, "r");
...processin' text...
FindClose(&FN);
}
So here it is... enjoy & thanx 2 me 4 solvin' this... & almost forgot "This site is useless!!!"
 |
|
| Volver arriba |
|
 |
|
|
No puedes publicar temas nuevos en este foro No puedes responder a temas en este foro No puedes editar tus mensajes en este foro No puedes borrar tus mensajes en este foro No puedes votar en las encuestas de este foro
|
© 2002–2026 Club Builder · Funciona con phpBB.
|