Necesito una ayuda alguna idea? / I need some help, any ideas? - Forum

Forum Navigation
You need to log in to create posts and topics.

Necesito una ayuda alguna idea? / I need some help, any ideas?

Español

Hola, quizás algún miembro que este mas familiarizado con el uso de array me pueda dar una mano, supongo que va por ahi.

Yo tengo un proyecto el cual genera dentro de una carpeta un archivo de texto (ej. 25663.txt) ese nombre lo genera a partir de un numero de planilla, y los archivos generados guardan en cada linea valores numericos.

Lo que debo conseguir es poder leer todos los archivos que contiene la carpeta (planillas) y poder extraer los datos de cada archivo para poder sumar y obtener el valor total de los importes de todos los archivos que se han almacenado

No puedo lograr hacerlo... y quizas sea una pavada... si alguien me puede dar una manito eternamente agradecido.

English

Hello, maybe a member who is more familiar with the use of array can give me a hand, I suppose it goes there.

I have a project which generates within a folder a text file (eg 25663.txt) that name is generated from a spreadsheet number, and the generated files save numerical values in each line.

What I must achieve is to be able to read all the files that the folder (spreadsheets) contains and to be able to extract the data from each file to be able to add and obtain the total value of the amounts of all the files that have been stored

I can't manage to do it ... and maybe it's bullshit ... if someone can give me an eternally grateful little hand.

Greetings

Saludos

 

Hello,

Not clear to me what the task is.

To get all *.txt files of a folder you can use FileList:

https://winhelp.visualneo.com/Files1.html#FILELIST

The read each file in a loop and read each line in a sub-loop.

Regards

Hans-Peter

Vadim has reacted to this post.
Vadim

@joferar333
Look also at the possibility of using a database (NeoDB or NeoDBpro). If you need to store data in an organized form, a database is better suited for that than individual files.