create txt file

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
carkon
Newbie
Posts: 13
Joined: Sun Sep 26, 2010 9:36 am

create txt file

Post by carkon » Thu Nov 18, 2010 11:28 pm

i have 2 txt file(a.txt,b.txt)..these are have 2000 lines some data
i want to make a new txt files with each lines...
i mean script reads both lines of these file ..and write these to new txt

line1 of a.txt and line1 b.txt ----->1.txt (contain these lines)
line2 of a.txt and line2 b.txt ----->2.txt
line3 of a.txt and line3 b.txt ----->3.txt
line4 of a.txt and line4 b.txt ----->4.txt
line5 of a.txt and line5 b.txt ----->5.txt
.
.
.
line2000 of a.txt and line2000 b.txt ----->2000.txt


so i will have 2000 txt files
Last edited by carkon on Thu Nov 18, 2010 11:33 pm, edited 2 times in total.

carkon
Newbie
Posts: 13
Joined: Sun Sep 26, 2010 9:36 am

Post by carkon » Thu Nov 18, 2010 11:30 pm

sorry about my english..not good

olllllliii
Pro Scripter
Posts: 60
Joined: Tue Dec 22, 2009 9:51 am
Location: Mannheim ( Germany )
Contact:

Hallo i Hope this is working for you

Post by olllllliii » Fri Nov 19, 2010 8:43 am

This works with version 11 - 12

Code: Select all

Let>i=1

Label>loop
ReadLn>C:\a.txt,%i%,line
Let>Filename=C:\%i%.txt
WriteLn>Filename,Result,line
IF>i>1999
    Goto>ending
    ELSE
    Add>i,1
    Goto>loop
ENDIF

Label>ending
EXIT
Oliver Hilger Mannheim
alias Olllllliii

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts