0

good day everyone! I have a problem regarding to my program. i want to create a multiple text file. To be clear to you, i'll give an example.

for example I want create a textfile named as text1.txt and another textfile text2.txt.
What possibly is the solution to prevent the 1st txt file to be overwritten by the 2nd txt file.

Is there any easy code that can I use?

Thank you in advance! :)

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by ChrisPadgham
0

for example I want create a textfile named as text1.txt and another textfile text2.txt.
What possibly is the solution to prevent the 1st txt file to be overwritten by the 2nd txt file.

Don't write the same thing to both files.

Why would text1.txt get overwritten by text2.txt? they are two different files.

0

if you are talking about writing two files at the same time then it simply a matter of opening them on different file unit numbers

open "text1.txt" for output on #1
open "text2.txt" for output on #2

print #1, "this will go in text1"
print #2, "this will go in tesxt2"

close #1
close #2
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.