I am looking for a program that can find the longest line of a
.txt file. It should run on Microsoft Windows. Any license or price is fine.
I am looking for a program that can find the longest line of a .txt file. It should run on Microsoft Windows.
I've listed two FREE solutions below that may suffice for your need.
You could use:
wc -L "c:\folder\file.txt" from the CoreUtils for Windows for example if you just need the number of the length of the longest line in that file. This would be a freebie too by the way.
You can do this in Windows with PowerShell as well for a particular file:
Get the maximum length number of a record in a file:
GC "c:\folder\file.txt" | Measure -Property length -Maximum | Select Maximum
Get the content of the longest line/record in a file
GC "c:\folder\file.txt" | Sort -Property length | Select -last 1
You can add an extension to
Notepad++ to perform this operation. See this answer on SuperUser for details