I want to know is there any Macro to edit big large number of text files in the way that it pick the file name and paste it in the same file last column in repetition till last row.
this request seems to be missing from your responses. As Marc has indicated, we are not mind readers. Please explain your logic to get the information required into the "After" file.a complete technical explanation for all we can't guess as we are not mind readers
If there is any way to make target file by using macro
Sub Demo1r()
    Const E = ".txt"
      Dim F%, P$, N$, SPQ$(), T$, C&, R&
          F = FreeFile
          P = ThisWorkbook.Path & Application.PathSeparator
          N = Dir(P & "*" & E)
    While N > ""
        Open P & N For Input As #F
        SPQ = Split(Input(LOF(F), #F), vbCrLf)
        Close #F
    If UBound(SPQ) > 5 Then
            T = Replace(N, E, "")
        If Right(SPQ(6), Len(T)) <> T Then
            C = C + 1
            Open P & N For Output As #F
            For R = 0 To 5:  Print #F, SPQ(R):  Next
            For R = 6 To UBound(SPQ) - 1:  Print #F, SPQ(R); Spc(4); T:  Next
            Print #F, SPQ(R); Spc(4); T;
            Close #F
        End If
    End If
          N = Dir
    Wend
          MsgBox "Mod #  :  " & C, vbInformation, " Demo1r"
End Sub