Get yesterday’s date in a windows batch file – correct version

Hi all,

If you use a windows server and get yesterday’s date for something like a download, you might probably use this popular script that can be found here and there. Unfortunately, the script is somewhat broken when dealing with getting the last day of the month. The logic is solid, but somewhere between the idea and implementation, something was lost.

see below the working, correct version:

 

 

Author: Adrian B

I'm a Business intelligence professional working in the tech scene in Berlin, Germany. I'm currently freelancing. If you'd like to check my services, visit http://adrian.brudaru.com

Leave a Reply

Your email address will not be published. Required fields are marked *