Club Builder - Foros de discusión Club Builder
Foro de C++Builder en español
 
 FAQFAQ   BuscarBuscar   MiembrosMiembros   Grupos de UsuariosGrupos de Usuarios   RegistrarseRegistrarse 
 PerfilPerfil   Entra para ver tus mensajes privadosEntra para ver tus mensajes privados   EntrarEntrar 

Recursively open files

 
Publicar nuevo tema   Responder al tema    Foros de discusión -> Consultas
Ver tema anterior :: Ver tema siguiente  
Autor Mensaje
Mensaje    Asunto: Recursively open files Responder citando

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
Mensaje    Asunto: Posible solución a mi problema, pero necesito + ... Responder citando

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
Mensaje    Asunto: Solution...... Responder citando

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
Mostrar mensajes de anteriores:   
Cambiar a:  
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


Hosting WordPress Indedmedia desde 3,99 €
© 2002–2026 Club Builder · Funciona con phpBB.