# Batch to copy some data in text file to another file



## hezal (Feb 21, 2011)

Hi Expertises,

I need your help to create batch that can copy SOME data from text file into another text file. here the sample of the data.

Sample data with fixed width (let say abc.txt have 2 lines of data which start with sequence no -5digits i.e 00001)

000012011123456781231234 5678 9012 345603/1103/16AHMAD NAKHAIE NO.1 JALAN BATU TAMAN BATU 51235 KEPONG KUALA LUMPUR 00000111234444444444#12B%SDF12345566ZZZZZ1111111111
000022011987654321007890 1234 5678 901203/1103/16MOHD FAHMI NO.59 JALAN SEKOLAH 3/5 TAMAN AIR BALOI 48752 SHAH ALAM SELANGOR 00000111234444444444#12B%SDF12345566ZZZZZ1111111111

what i want is to copy/extract data from position 50 until 204 on each line and paste into a new text file. the output file should be like below;

new file create;

AHMAD NAKHAIE NO.1 JALAN BATU TAMAN BATU 51235 KEPONG KUALA LUMPUR 
MOHD FAHMI NO.59 JALAN SEKOLAH 3/5 TAMAN AIR BALOI 48752 SHAH ALAM SELANGOR 

appreciate if someone can help me on this


----------



## Squashman (Apr 4, 2003)

I can't tell where your lines of data stop and start. Could you upload it as a text file so I can see a better example of it.
I think you could surround your data in code tags as well and then it wouldn't wrap the data.


----------



## hezal (Feb 21, 2011)

hi squashman,
i've attached abc.txt for your refference.


----------

