(imported topic written by Dan_Spain)
Extracting information from a file
I have some troubles about parsing text from a local file.
There are some log files in a folder. The content of one is like this:
- Start Install Bartech Bartech 3.6.0
Instalación Bartech
2013/09/23 15:30
.
.
.
- == INSTALACION OK
2013/09/23 15:35
- Finish Install Bartech Bartech 3.6.0 -
The idea is to parse the text of all files to obtain the following string:
Line 2: Filtered == Bartech Bartech 3.6.0
Line 5: Complete == 2013/09/23 15:30
Last Line - 5: Complete == 2013/09/23 15:35
Last Line - 6: Filtered == INSTALACION OK
The results will be like that:
Bartech Bartech 3.6.0 - 2013/09/23 15:30 - 2013/09/23 15:35 | INSTALACION OK
First problem found: Failed query when obtaining the same line for some files
Q: names of files whose ((name of it ends with “.Log”)) of folder “C:\temp” as string
A: TEM-Install-BartechBartech360.Log
A: TEM-Install-CopyFile290Mb.Log
T: 0.571 ms
Q: (following text of position 18 of line 2 of file whose ((name of it ends with “.Log”)) of (folder “C:\temp”)) as string
A: Bartech Bartech 3.6.0
E: Singular expression refers to non-unique object.
Second problem found: Problem to concatenate
Q: ((following text of position 18 of line 2 of it) & " - " & (line 5 of it)) of file “C:\temp\TEM-Install-BartechBartech360.Log”
A: Bartech Bartech 3.6.0 - 2013/09/23 15:30
T: 0.447 ms
Q: ((number of lines of it as integer) - 5) of file “C:\temp\TEM-Install-BartechBartech360.Log”
A: 14
T: 0.545 ms
Q: ((following text of position 18 of line 2 of it) & " - " & (line 5 of it) & ((number of lines of it as integer) - 5)) of file “C:\temp\TEM-Install-BartechBartech360.Log”
E: The operator “concatenate” is not defined.
So i have at this moment two errors, one for obtaing the same content from various files an one problem for concatenate various results. Anybody can assist me?