Get the App
SLTechnology News&Howtos  ›  Development  › 

How to read the last line of a text file with vbs

Shulou Source: shulou.com Published: 2022-06-03 19:38:21 10月04日 Update

This article focuses on "how to use vbs to read the last line of a text file". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to read the last line of a text file with vbs.

The copy code is as follows:

Const ForReading = 1 Set objFSO = CreateObject ("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile ("C:\ Scripts\ Test.txt", ForReading) Do Until objFile.AtEndOfStream strLine = objFile.ReadLine Loop objFile.Close Wscript.Echo strLine so far, I believe you have a better understanding of "how to read the last line of a text file with vbs". You might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: One line file text code content learning practical deeper interest practicality practical simple operation method more friends website channel query Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Redmi vpn Shulou Tech Info macOS