Quantcast
Channel: How to check if a txt file is empty
Browsing latest articles
Browse All 4 View Live

How to check if a txt file is empty

Another method that does not involve the overhead of pre-reading the file would be to use the FileInfo class.    Dim fiAsNew System.IO.FileInfo("f:\temp\New Text Document.txt")   If fi.Length = 0 Then...

View Article



How to check if a txt file is empty

Simple:Dim text AsString = System.IO.File.ReadAllText("path")'file is empty!If text.Length = 0 ThenEndIfMitja

View Article

How to check if a txt file is empty

one way is to use the File class ReadAllBytes method, and see if the array Length = 0.If not, then process the file. Something like this:PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e...

View Article

How to check if a txt file is empty

I need to check if a .txt file is empty, if it's not, the code will read the file and process the information.I know how to read .txt file. Is there a way to check if the .txt file is empty? not an...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images