Skip to content

Instantly share code, notes, and snippets.

@rahulbanerjee26
Created June 22, 2022 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulbanerjee26/38225b79df1eff662b5185189f103361 to your computer and use it in GitHub Desktop.
Save rahulbanerjee26/38225b79df1eff662b5185189f103361 to your computer and use it in GitHub Desktop.
function writeToFile(path, data){
var writeSystemObject = new ActiveXObject("Scripting.FileSystemObject");
var writeStream = writeSystemObject.CreateTextFile(path,true);
writeStream.Write(data);
writeStream.close();
}
writeToFile("C:\\theFile.txt", "This text was written using a TextStream");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment