Skip to content

Instantly share code, notes, and snippets.

@soft2help
Created August 31, 2021 14:36
Show Gist options
  • Select an option

  • Save soft2help/a7cfc196b268b2d33ca9d28803a2818a to your computer and use it in GitHub Desktop.

Select an option

Save soft2help/a7cfc196b268b2d33ca9d28803a2818a to your computer and use it in GitHub Desktop.
Windows Batch Find Most Recent Modified File
set Path="C:\tmp\"
for /f "tokens=*" %%a in ('dir /A:-D /B /O:-D /S %Path%') do set NEW=%%a&& goto:n
:n
echo %NEW%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment