This is my first question and I'm not very experienced using batch files so hope someone can help.
I want to find the last directory created using a batch file and have tried:
FOR /f "tokens=*" %%A in ('dir "%latestdirectory%" /AD-h /B /o-d') do (set recent=%%A)
Run Code Online (Sandbox Code Playgroud)
but this result keeps returning the oldest directory not the most recent one.
Still trying to pick this up in batch.
我有一个网络位置,从那里我需要知道创建的最新文件夹的名称。我想使用批处理文件来做。任何帮助都会很棒