Created
August 17, 2012 15:10
-
-
Save yukioc/3379701 to your computer and use it in GitHub Desktop.
write time and comment to log file for recording a login or logout time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a=WScript.arguments; | |
var f=WScript.CreateObject("Scripting.FileSystemObject"); | |
var d=(new Date()).toLocaleString(); | |
var c=(a.length>0)?a(0):""; | |
var n=WScript.ScriptFullName.replace(/\.\w+/,".txt"); | |
var t=f.OpenTextFile(n,8,true); | |
t.WriteLine( d+" "+c ); | |
t.Close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment