I am trying to copy files using robocopy. The files I want to copy should be of last month(not one month old) i.e. on if I am running the script in the march month(any day) then it should copy all the files with timestamp of february. I am using below script:
robocopy source/*.prev destination maxage:20180201 minage:20180228
How to use the date as a variable here so I don't have to manually change it every month?