How to copy file and run script based on current date?

Question:

Every day after midnight I have to copy log file from day before.

Log names are in format exYYMMDD.log. So today (22.10.2011) I would have to copy file named ex111021.log into some directory.

Is it possible to do it in batch script? If not I could use powershell but would prefer not as it is not installed on my server.

Edit:
With help of Siva Charan I created this (polish win7 – echo %date% prints YYYY-MM-DD)

Answer:

In powershell :

Source:

How to copy file and run script based on current date? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply