Forum Discussion
- rraghvaniChampion Level 3
Have a look at the answer I provided in your previous post, https://community.smartbear.com/t5/TestComplete-Questions/To-write-in-text-file/td-p/253167
- Shivani3Occasional Contributor
But with that it is only possible to skip the number of lines and the it is replacing the existing text. But I don't want to replace that text I just want to create new line below the existing line then write on that line.
- rraghvaniChampion Level 3
You can also use Scripting.FileSystemObject as shown below, which appends a string to the end of file.
function AppendFile() { let FS = getActiveXObject("Scripting.FileSystemObject"); let F = FS.OpenTextFile("C:\\Temp\\MyTest.txt", 8); F.WriteLine("Three"); F.Close(); }
Again, you will have to create your own function, if you want to write a string to a specific location.
Related Content
- 8 years ago
- 3 years ago
Recent Discussions
- 2 hours ago