Writing values to seperate files
Writing values to seperate files
I want to write values to two separate cvs files at the same. When I use "file:write()" to specify the value that I write to the file, how do I specify which file it should be on?
Re: Writing values to seperate files
Hello,
simply open two different files, e.g.:
Cheers
simply open two different files, e.g.:
Code: Select all
file1 = io.open('file1.txt', 'w+')
file1:write('write this to file 1')
file2 = io.open('file2.txt', 'w+')
file2:write('write this to file 2')