|I was trying to look at a method to copy (not move) 10 files from 1 directory to another to then wait 1 minute and then copy the next 10.It would do this for all files in the folder.|
I had tried
for /f "tokens=*" %%D in ('dir/b/od *.xml') do set latest=%%D
xcopy "%latest%" C:\temp\files\folder2
I had tried this but this will always move the oldest file each time so even if I ran it 10 times it would always try and copy the same file.
I have to leave the original files in the first folder and copy the files not move them.