Kindly clarify the programming

March 28, 2012 at 07:55:35
Specs: Windows XP
dos tool to extract a column from text file

:: EX3.BAT Usage: ex3 "G:\Preusage\OR_DLY_PRE_USAGE.txt"
@echo off > ""
for /F "tokens=3 delims=," %%j in ('type "%~1"') do echo.%%j>> ""
:: End_Of_Batch

Where do I put source file name and destination file name... would love an example.

My file and path are G:\Preusage\OR_DLY_PRE_USAGE.txt

See More: Kindly clarify the programming

Report •

March 28, 2012 at 08:19:42
ex3 G:\Preusage\OR_DLY_PRE_USAGE.txt

It will save the new file in that path with a .new extension.


Report •

March 28, 2012 at 08:38:35
@(@for /F "tokens=3 delims=," %%j in (G:\Preusage\OR_DLY_PRE_USAGE.txt) do @echo.%%j)> "G:\Preusage\"

How To Ask Questions The Smart Way

Report •

March 29, 2012 at 03:46:24
Thanks to both of you.... I am a complete novice in this.. would like to have ur help in write the complete program for me to create a batch file to extract a particular column from a database in *.txt format.

Report •

Related Solutions

March 30, 2012 at 08:28:18
whats the format in the text file? is it


if thats the case you can use %%J %%K and %%L to minipulate those

for example if you wanted to put item2 in each line into a text file you could use

echo %%K >> newfile.txt


Report •

Ask Question