GTsafas
asked on
Batch scripting IF TIME = THIS OR LATER DO THIS
I need an if statement that says if the time is 6:45pm or later it creates a blank text document
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can run that from a batch file as:
cscript //nologo checklate.vbs
Steve
cscript //nologo checklate.vbs
Steve
if time > timeserial(13,45,00) then
wscript.echo "Is after 6:45pm, creating file"
Set objFSO = CreateObject("Scripting.Fi
Dim fileOutput: Set fileOutput = objFSO.CreateTextFile("C:\
fileOutput.Close
Set objFSO = Nothing
else
wscript.echo "It is before 6:45pm"
end if