I have a list of zip files with date and time appended like yyyymmdd_hhmmss_Demos.zip. Now how to get the most recently added zip file in the source dir. I need
yyyymmdd_hhmmss_Demos.zip
set Path="D:\hello\abc\old" for /f "tokens=*" %%a in ('dir /A:-D /B /O:-D /S %Path%') do set NEW=%%a&& goto:n :n echo %NEW%