03-27-2018 02:59 AM
Hello,
Can you tell me if, thank's to a function, we can read between two lines ?
For example, I have one file in.txt, it has 10 lines, and, I want to write what we have between lines 4 and 8 in an other file out.txt.
Thank's for your time
Solved! Go to Solution.
03-27-2018 03:08 AM
There isn't a native function that performs what you want but you can easily write one by yourself.
Something like this (pseudocode):
Open file for input (OpenFile) Open file for output (OpenFile) Read all lines one-by-one (ReadLine) Copy desired lines to oputput file (WriteLine) Close input file (CloseFile) Close output file (CloseFile)
Do not forget to add a proper error checking strategy to deal with I/O errors.
03-27-2018 03:08 AM
answer is given here
03-27-2018 03:20 AM
Yesss! That's the problem when posting the same question twice! ![]()
In the future please do not repeat this: always post a single question in the international board, or post directly to the French board if you prefer your native language
03-27-2018 04:05 AM
Thank's for your answers, I have found the solution ! 🙂
Ok RobertoBozzolo I'll do not repeat this !