I'm trying to write a batch file that will scan through a folder and pick a certain file. The file that i'm looking for is the file that was put into the folder first. As files get dropped into the folder they get named as
What I want to do is to pick the file with the highest (or lowest) number and copy it to another folder.
As a test i tried the code below but it did not work.
rem @echo off
IF EXIST d:\mydir\*.* goto process
echo does not exist
for each %%a in (d:\mydir\*.*) do echo %%a