I’m trying to create a property to display 2 values from a text file.
For example:
I want to display the “Source IP:” and “Source:” from an output text file on the local C: drive.
the is the full content of the file; in “C:\temp\w3tm.txt”
I bit more comprehensive and more what I think you were asking for …
(if (it as string as lowercase starts with "source: ") then (it) else (substrings before ")" of (substrings after "(" of it))) of lines whose ((it as string as lowercase starts with "source: ") OR (it as string as lowercase contains "source ip:")) of file "C:\temp\w3tm.txt"
Thank you.so much! I will spin my vm and try both.
I was able to pull the setting, but only one at a time with:
If (exists file “c:\ocd\w32tm.txt”) then (line 6 of file “c:\ocd\w32tm.txt”) else "No Result"
If (exists file “c:\ocd\w32tm.txt”) then (line 8 of file “c:\ocd\w32tm.txt”) else “No Result”
But I’m not able to pull both line 6 and line 8 within the same property.
Q: Lines whose ((it as string as lowercase starts with "source: ") OR (it as string as lowercase contains “source ip:”)) of file "C:\temp\w3tm.txt"
E: Singular expression refers to nonexistent object.
The one I was using that pull only 1 line worked from the same file and path.
Q: If (exists file “c:\temp\w32tm.txt”) then (line 8 of file “c:\temp\w32tm.txt”) else "No Result"
A: Source: Servername.domain.com
T: 0.536 ms
Q: Lines whose ((it as string as lowercase starts with "source: ") OR (it as string as lowercase contains “source ip:”)) of file "C:\temp\w32tm.txt"
A: ReferenceId: 0x0A080C1F (source IP: 10.10.10.10)
A: Source: Servername.domain.com
T: 0.951 ms