I have scripted Make_Columns.bat to display the contents of a File in aligned columns.

The syntax for using Make_Columns.bat is:

CALL Make_Columns FileName deMark leadTrailSpace

where:

<b>FileName</b>       is the file you wish to display.

<b>deMark</b>         is the separator that is in the file, like "<b>|</b>". It can be a string of characters.

<b>leadTrailSpace</b> is the spaces that you wish to add before and after the <b>deMark</b>, like "  ".
NOTE: Leading and trailing spaces are eliminated before applying leadTrailSpace.

Sample Usage

Here is a sample script that displays the content of a file, first without using Make_Columns.bat, them with it:
@echo off
setlocal ENABLEDELAYEDEXPANSION
for /f "tokens=1* Delims=:" %%a in ('ipconfig^|findstr "Ethernet Address"') do (
 set work=%%a:
 if "!work:~0,16!" EQU "Ethernet adapter" set NWK=!work!
 if "!work:~0,18!" EQU "        IP Address" @echo !NWK!^|%%b>"%TEMP%\Test_Make_Columns.TMP"
)
for /f "Tokens=*" %%a in ('hostname') do (
 @echo COMPUTER NAME:^| %%a>>"%TEMP%\Test_Make_Columns.TMP"
)
type "%TEMP%\Test_Make_Columns.TMP"
@echo.
@echo .................................................
@echo.
call Make_columns "%TEMP%\Test_Make_Columns.TMP" "|" "  "
del /q "%TEMP%\Test_Make_Columns.TMP"
endlocal
Make_Columns.bat contains:
@echo off
if \{%3\}==\{\} @echo Syntax: Make_Columns FileName deMark, LTSpace&goto :EOF
if not exist %1 @echo Syntax: Make_Columns - %1 NOT FOUND.&goto :EOF
setlocal
if exist "%TEMP%\Make_Columns_VBS.VBS" goto doit
@echo dim txt, fso, readfile, contents, FullFileName, objArguments>"%TEMP%\Make_Columns_VBS.VBS"
@echo dim deMark, LTSpace>>"%TEMP%\Make_Columns_VBS.VBS"
@echo On Error Resume Next>>"%TEMP%\Make_Columns_VBS.VBS"
@echo Set objArguments = Wscript.Arguments>>"%TEMP%\Make_Columns_VBS.VBS"
@echo set fso = CreateObject("Scripting.FileSystemObject")>>"%TEMP%\Make_Columns_VBS.VBS"
@echo FullFileName=objArguments(0)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo deMark=objArguments(1)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo LTSpace=objArguments(2)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo set readfile = fso.OpenTextFile(FullFileName, 1, false)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo Do until readfile.AtEndOfStream = True>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.   contents = readfile.ReadLine>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.   txt = txt ^& contents ^& vbCrlf>>"%TEMP%\Make_Columns_VBS.VBS"
@echo loop>>"%TEMP%\Make_Columns_VBS.VBS"
@echo readfile.close>>"%TEMP%\Make_Columns_VBS.VBS"
@echo Wscript.Echo Make_Columns(txt, deMark, LTSpace)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.>>"%TEMP%\Make_Columns_VBS.VBS"
@echo Function Make_Columns(stringTEXT, deMark, leadTrailSpace)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo Dim arrayCOL, elementCOL, strElement, elementROW>>"%TEMP%\Make_Columns_VBS.VBS"
@echo Dim arrayLEN, elementLEN, arrayROW, stringROW>>"%TEMP%\Make_Columns_VBS.VBS"
@echo Dim stringProportional, proportionalColumns, number>>"%TEMP%\Make_Columns_VBS.VBS"
@echo Make_Columns = "">>"%TEMP%\Make_Columns_VBS.VBS"
@echo proportionalColumns = "">>"%TEMP%\Make_Columns_VBS.VBS"
@echo.    arrayROW = Split(stringTEXT,vbCrLf)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.    For elementROW = 0 To UBound(arrayROW)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.        stringROW = arrayROW(elementROW)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.        arrayCOL = Split(stringROW,deMark)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.        If elementROW = 0 Then>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            ReDim arrayLEN(UBound(arrayCOL))>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            For elementLEN = 0 To UBound(arrayLEN)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.                arrayLEN(elementLEN) = 0 >>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            Next>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.        End If>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.        For elementCOL = 0 To UBound(arrayCOL)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            strElement = Trim(arrayCOL(elementCOL))>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            If Len(strElement) ^> arrayLEN(elementCOL) Then>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.                arrayLEN(elementCOL) = Len(strElement)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            End If>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.        Next>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.    Next>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.    For elementROW = 0 To UBound(arrayROW)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.        stringROW = arrayROW(elementROW)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.        arrayCOL = Split(stringROW,deMark)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.        For elementCOL = 0 To UBound(arrayCOL)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            strElement = Trim(arrayCOL(elementCOL))>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            number = arrayLEN(elementCOL) - Len(strElement)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            stringProportional = Space(number)>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            If elementCOL = 0 Then>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.                proportionalColumns = proportionalColumns _>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.                ^& strElement ^& stringProportional>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            Else>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.                proportionalColumns = proportionalColumns _>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.                ^& leadTrailSpace ^& deMark ^& leadTrailSpace ^& strElement _>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.                ^& stringProportional>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.            End If>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.        Next>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.        proportionalColumns = proportionalColumns ^& vbCrLf>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.    Next>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.    Make_Columns = proportionalColumns>>"%TEMP%\Make_Columns_VBS.VBS"
@echo.End Function>>"%TEMP%\Make_Columns_VBS.VBS"
:doit
cscript //nologo "%TEMP%\Make_Columns_VBS.VBS" %1 %2 %3
endlocal