Solved .bat file to copy a last modified file

October 12, 2012 at 03:14:29
Specs: Windows 7
Hello Everyone,

I want to copy a last but one modified files from one folder to another

Suppose my server generate a file at 1.30 and till 2.30 it will write in that same file only and 2.31 it will create another file so if i run this batch file at 2.40 to get the data from 1.30 to 2.30 i need the file which is generated 1.30 not the 2.31

Thanks and regards,


See More: .bat file to copy a last modified file

Report •

October 12, 2012 at 17:25:10
✔ Best Answer
::====== begin
@for /f "skip=1 tokens=*" %%a in ('dir /b /o-d') do copy /y %%a destinationdir
::===== end
destination is hardwired, but that can be changed according to needs.

Report •
Related Solutions

Ask Question