rem get latest file:
for /f "tokens=*" %%i in ('dir "\\taaproc0200a\D$\hbc\data\dc\backup\LEEXTR_DC30*.txt" /s /od /b') do set a=%%i
rem copy it:
copy "%a% "D:\Kronos\InterfaceDesigner\DA DC Interface\Associate\DCXX Associate Files\LEEXTR_DC30.txt"
As for "delete the copied file at a specific time" - can you specify this? After x days? On next Monday? If there is a new version?
Last one would be easy: no need to delete, just overwrite it. (copy
-parameter /y
)