My goal is to copy the latest file (based on modified date) in Windows to a different folder, and then rename the file to something different. My last line that is commented out was just a test to see that the copy command was working. Feel free to use whatever is installed by default in Windows.
Here's what I have so far:
cd C:\Users\Mac\Desktop\old
FOR /f %%i IN ('dir /o:-d /b') DO (set LAST=%%i goto stop)
:stop
copy /Y %LAST% C:\Users\Mac\Desktop\new\current.csv
# copy C:\Users\Mac\Desktop\old\a1.txt C:\Users\Mac\Desktop\new\current.csv