on 09-18-2020 10:42 AM
I having a text file (named: Sample.txt) which has some content in it, I need to append some words or lines on the same text file in SAP IRPA.
Hello Mr. Kowtham,
there are two possibilities:
1. You use the integrated FSO library (https://help.sap.com/viewer/dbe2687952b8433a953c6b6305429122/Cloud/en-US/4947f288eee14c07bd41b6e4654...😞
var file = '...';
var txt = '...';
ctx.fso.file.write( file, txt, e.file.encoding.UTF8 );
2. You create your own fso Object:
var fso = new ActiveXObject("Scripting.FileSystemObject");
var filepath = fso.GetFile("C:\\temp\\Sample.txt");
var fileObject = fso.OpenTextFile(filepath, 8);
fileObject.WriteLine("Your text");
fileObject.WriteLine("second line");
fileObject.WriteLine("and the third");
fileObject.close();
Best regards,
Alois Windholz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.