Hi All,

I am newbee to scripting and need help to create robocopy script
we have one group dumps daily report files to our shared drive creating new folder each day in yyyymmdd format

Source:

\\<Server1>\temp\20160401
\\<Server1>\temp\20160402
\\<Server1>\temp\20160403

I need robocopy script to be created to copy only latest date folder and its files from above source to destination share drive below

Destination:

\\<Server2>\all reports\report


Daily expected result should be (copying yesterday's folder only to destination)

on April 02, 2016

\\<Server2>\all reports\report\20160401


on April 03, 2016

\\<Server2>\all reports\report\20160402


on April 04, 2016

\\<Server2>\all reports\report\20160403


Have tried below robocopy script but it copies all folders instead of yesterday's folder with files.
i believe there must be a some date logic need to be included

robocopy "\\<Server1>\temp" "\\<Server2>\all reports\report" /S