Jump to content

elyfrank

Member
  • Posts

    1
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About elyfrank

Profile Information

  • OS
    none specified

elyfrank's Achievements

0

Reputation

  1. Hi guys, I need some help with this script. This script is working right, it reads all the .txt files in a folder and add content in the first line. I just need to modify it so I can add the content after the 1st line of the text files. Thank you very much file.txt example: line 1 my text goes here line 2 line ... vbs script: Dim FSO, txs, fld, fil, content Set FSO = CreateObject("Scripting.FileSystemObject") Set fld = FSO.GetFolder("C:\test\") For Each fil In fld.Files If Right(fil.Name, 3) = "pat" Then Set txs = fil.OpenAsTextStream(1) ' 1 = for reading content = txs.ReadAll txs.Close Set txs = fil.OpenAsTextStream(2) ' 2 = for writing txs.Write "MyDisclaimer:" & vbCrLf & content txs.Close End If Next
×
×
  • Create New...