I have a network location from where I need to know the name of latest folder created. This I want to do using batch file. Any help will be great
I was able to do this by the following way:
@echo off
for /f "tokens=*" %%A in ('dir "<directory name>" /AD /O-D /B') do (set recent=%%A& goto exit)
:exit
echo %recent%
Any better solution can be good.
来源:https://stackoverflow.com/questions/6367747/using-batch-file-i-need-to-know-the-latest-folder-name-in-the-particular-locatio