batch file - How to get folder name from provided input path with CMD -


i have input path c:\student\temp in temp folder, there many other folders. want latest folder name order descending.

@echo off  /f "tokens=* delims=" %%# in ('dir /b /a:d /o:d /t:c "c:\student\temp"') set "latest=%%~nx#" 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -