why are you guys using DOS to do date arithmetic ? Its time to move on
@OP. Use the next better language that M$ provides you, out of the box
WScript.Echo DateAdd("d", -1, Now)
save the above as yesterday.vbs on the command prompt
c:\test> cscript /nologo yesterday.vbs