开发者

Using batch file I need to know the latest folder name in the particular location

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.开发者_如何学JAVA 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜