I want code in batch programming
i have thousands of file ilke
MARTY 12-03-2012
BATCY 15-01-2013
JYTCHE 10-12-2011
this type of file i have so i want to find newest date file and save on destination folder
in above list newest file BATCY 15-01-2013
so copy this file to destination folder
i want this code in batch programming
Copy newest file from folder
Moderator: DosItHelp
Re: Copy newest file from folder
This checks the files date stamp.
Code: Select all
@echo off
for /f "delims=" %%a in (' dir /b /a-d /od ') do set "file=%%a"
copy /b "%file%" "c:\destination"