Hello @Trivino Y Garcia Abelardo ,
Welcome to Microsoft Q&A forum.
First of all, in Windows OS, a file name can’t contain any of the following characters: \ / : * ? " < >
I see that in 1.txt file, line 5 and line 10, :
is included. So, I believe the name of the newly generated file may not be set correctly in real folder, but the output in terminal may be correct.
Second, the main code is included in For i=1 To 4 … EndFor
, so the whole process will run for four times. I’m not sure if on your side, you do have four files(1.txt, 2.txt, 3.txt, 4.txt), and they are not empty.
Please note => File.WriteContents(filePath, contents)
=> "Opens a file and writes the specified contents into it, replacing the original contents with the new content". You may check if the content was replaced by empty content during the loop.
Best Regards,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.