I am trying to build a .bat file to move files from 1 folder into another one, based off of the oldest time-stamped file.
Folder 1:
Filename: Date Modified:
test1.dat 5/12/2014 4:03pm
test2.dat 5/12/2014 4:04pm
The goal is to move the oldest file into Folder 2. Currently, my batch file below moves everything from folder 1 to folder 2, obviously because I don't have any time related code entered.
set Delay=10
move /-y "C:\Users\bingersoll001\Desktop\folder1\*.dat" "C:\Users\bingersoll001\Desktop\folder2"
timeout 10 /nobreak
call move.bat
Is there any way to accomplish this?