Read and change line of files in different folders


I will try to explain what I am looking for in a simple and brief way.

Taking into account the following folder structure.

carpetaPrincipal -> carpeta1 y carperta2

Within carpeta1 and carpeta2 there is a file called texto.txt , which contains the line - > version=2.0

What I am looking to implement is to read all the folders that have carpetaPrincipal and in turn, read the files that contain those folders and change the text from version=2.0 to version=3.8

I do not know if it will be very difficult to do this. I still have nothing but I had thought about using BufferedReader and FileReader . Save in Strings the name of the route in question and the name of the file to be searched next to the line to be changed.

I hope you can guide me a bit.

Thanks in advance.

asked by Mario Guiber 12.12.2018 в 09:11

0 answers