I need to delete multiple lines in multiple text files.
So anything above line 5 (i.e. begin) needs to be deleted. I have searched the web and found it is possible when i do it using VB script, but the draw back is i can only do one text file at a time. The Source code for VB is as follows:
Const ForReading = 1
Const ForWriting = 2
Set objFSo = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile('C:\testing\testing.txt', ForReading)
strContents = objFile.ReadAll
arrLines = Split(strContents, vbCrLf)
Set objFile = objFSO.OpenTextFile(C:\testing\testing.txt', ForWriting)
For i = 5 to UBound(arrLines)
Question: How do i specify multiple fies in the
Set objFile = objFSO.OpenTextFile(C:\testing\testing.txt', ForWriting) line....coz if use wildcards the script does not undersatnd it...example ..*.txt
Is there a way to do it in batch programming?
Any help would be greatly appreciated.
Thanks in advance.