save this with .bat
extension:
@if (@x)==(@y) @end /***** jscript comment ******
@echo off
cscript //E:JScript //nologo "%~f0" "%~nx0"
exit /b %errorlevel%
@if (@x)==(@y) @end ****** end comment *********/
var d = new Date();
d.setDate(d.getDate()-4);
WScript.Echo("berfore 4 days : "+d);