Batch Help: Extracting data from text File

January 13, 2011 at 04:59:49
Specs: Windows 7
Hi,

Here is the my Text File Download

This is just a sample file of 6 data and my original file has more than 3000 record. I need help from some one who can guide my BATCH program that will extract data from the file and put in another text file.

My Out Put File should be :Download


See More: Batch Help: Extracting data from text File

Report •


#1
January 13, 2011 at 05:38:29
Edit:Filenames...

This may not cover all eventualities, but seems ok on the test data:

@echo off
echo Overwrite "ShoutMix-OUT.txt" if it exists?
copy /-y nul "ShoutMix-OUT.txt"
for /f "tokens=2 delims='\" %%a in (' find "://" ^< "ShoutMix.txt" ') do (
    >nul find "%%a" "ShoutMix-OUT.txt" || >> "ShoutMix-OUT.txt" echo %%a
)
pause

All it does is strip out the text between the first single quote and backslash.


Report •

#2
January 13, 2011 at 08:59:18
Judago,

Pretty smooth.

It will take me a while to figure that out.


=====================================
Life is too important to be taken seriously.

M2


Report •

#3
January 13, 2011 at 09:02:41
Thanks man! Its work like magic!

Report •

Related Solutions

#4
January 13, 2011 at 18:05:38
M2,

It's actually pretty simple, I'm sure it's already hit you ;).


dineshbabu179,

No problem!

I'm sure this could have gone back and forth for days if it wasn't for you uploading the files.


Report •


Ask Question