Quantcast
Channel: [Q&A - FAQ Neotys] Last questions
Viewing all articles
Browse latest Browse all 2283

How to write two variables to an external file?

$
0
0

I have been using below script to wrote myVar to an external file but now along with this, I want to write Timestamp too.
It should be like myVar Timestamp (space between the two)

var myVar= context.variableManager.getValue("Var");
if (myVar==null )
{
context.fail("No values");
}
writeFile(myVar);
}
function writeFile(text)
{
var writer = new java.io.FileWriter("C:\\Users\\\\Desktop\\test.csv",true);
writer.write(text);
writer.write("\r\n");
writer.close();
}


Viewing all articles
Browse latest Browse all 2283

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>