Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
@echo off
for /f "delims=" %%F in ('dir /AD /TW /B') do set filename=%%F
goto tests
:tests
@echo on
echo "%filename%"
// loop through output of the dir command with parameters, assign to filename. the last assignment is the result. /AD - no directories /TW - sort by time /B - filenames only
I checked, it seems to work. But I think the logic should be something like this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question