Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // i hate you
- function WriteText(){
- WScript.Echo("Enter the path of the specified text file.");
- var path = WScript.StdIn.ReadLine();
- WScript.Echo("Enter the text that you want.");
- var text = WScript.StdIn.ReadLine();
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- try{
- var file = fso.OpenTextFile(path,2);
- file.WriteLine(text);
- file.Close();
- }catch(e){
- WScript.Echo("You entered the wrong things.");
- WScript.StdIn.ReadLine();
- }
- }
- WriteText();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement