asked on
ASKER
ASKER
::- Script Name: TabColumnOutput
::- Finds only the selected columns (The first, plus those divisable by four) from a tab deliniated file and outputs them to the command prompt
@ECHO OFF
SETLOCAL EnableDelayedExpansion
SET "SrcFile=C:\Admin\TabFile.txt"
SET "TAB= "
FOR /F "usebackq tokens=*" %%A IN ("%SrcFile%") DO (
SET "RawData=%%~A"
SET "Count=0"
FOR %%B IN ("!RawData:%TAB%=","!") DO (
SET /A "Count=!Count!+1"
SET /A "Div=!Count! %% 4"
IF !Count!==1 ECHO %%~B
IF !Div!==0 ECHO , %%~B
)
)
ENDLOCAL
Microsoft Disk Operating System (MS-DOS) was an operating system for x86-based personal computers, and traces of it are still found in the Windows operating system. DOS is still used in some embedded systems and for certain legacy 16-bit networks.
TRUSTED BY
Open in new window