开发者

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

开发者 https://www.devze.com 2023-03-13 03:48 出处:网络
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

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

精彩评论

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