Hi
How to quickly check if a file has 1 or more lines of text?
I’m not talking about counting all lines of text, just a quick check if the file has 1 or more lines.
Please help me
Hi
How to quickly check if a file has 1 or more lines of text?
I’m not talking about counting all lines of text, just a quick check if the file has 1 or more lines.
Please help me
→ Store the file path in a String Variable called FilePath.
→ Create a Array[String] variable called NoofLines
Assign - NoofLines = System.IO.File.ReadAllLines(FilePath.ToString)
→ Create another int variable called Lines
Assign - Lines = NoofLines.Count
Then take a if condition to check the Lines count which is greater than 1.
If - Lines>1
Hope it helps!!