I need help in finding what AM'I doing wrong here in the batch script. I'm able to copy files to first destination, ie EmployeeData Folder. There is second folder in EmployeedataFolder, called BackUpforEmployeeData, in which I'm unable to copy the same file with date appended.
The first destination, It has to replace the file, Second destination, it should copy files with appended date. No prompts for action is needed, as i have scheduled it on a task scheduler. Please help!
@echo off
xcopy "\\Source\hr\Employee.txt" "E:\EmployeeData" /Y
@echo off
rem set YYYY=%dt:~0,4%
rem set MM=%dt:~4,2%
rem set DD=%dt:~6,2%
rem set stamp=%YYYY%-%MM%-%DD%
xcopy "\\Source\hr\Employee.txt" "E:\EmployeeData\BackUpForEmployeeData\Employee_%DATE% /Y
/I /S
Pause