Created
January 2, 2012 00:15
-
-
Save bash0C7/1548748 to your computer and use it in GitHub Desktop.
WorkLogger.vbs
This file contains 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
'1 line ver | |
CreateObject("Scripting.FileSystemObject").OpenTextFile(CreateObject("Scripting.FileSystemObject").BuildPath(CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName), "worklog_" & WScript.CreateObject("WScript.Network").ComputerName & ".txt"), 8, True).WriteLine date & vbtab & time & vbTab & InputBox("Comment", WScript.ScriptName) | |
'3 line ver | |
With CreateObject("Scripting.FileSystemObject") | |
.OpenTextFile(.BuildPath(.GetParentFolderName(WScript.ScriptFullName), "worklog_" & WScript.CreateObject("WScript.Network").ComputerName & ".txt"), 8, True).WriteLine date & vbtab & time & vbTab & InputBox("Comment", WScript.ScriptName) | |
End With | |
'4 line (basic) | |
With CreateObject("Scripting.FileSystemObject") | |
With .OpenTextFile(.BuildPath(.GetParentFolderName(WScript.ScriptFullName), "worklog_" & WScript.CreateObject("WScript.Network").ComputerName & ".txt"), 8, True) | |
.WriteLine date & vbtab & time & vbTab & InputBox("Comment", WScript.ScriptName) | |
.Close | |
End With | |
End With |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment