|Hi all, newbie here, I need help to create a batch file that will copy data (log files) from one folder to another from the last 24 hours to the current time the batch file was run/open.|
Previously, I have used this code and it worked, however this code is deficient as it only copy the log files based on the current date.
Lets say if somebody is seeking for data from the last 24 hours, and he/she runs the program on 24 Jan, 12.01 am, thus all the data from the previous day wont be copied.
Below is the code I have used previously.
for /F "tokens=1* delims= " %%A in ('DATE/T') do set SYSDATE=%%B
xcopy "w:\documents\*.doc" c:\dest /E /Y /D:%DATE_MM_DD_YYYY%