Get last created directory batch command
How can i get newest subfolder in directory ? I need it in MKLINK /D command. Thanks
stackoverflow.com
없는게 없군요...
가장 최근 폴더를 찾는 배치명령입니다.
NWC 업로드 폴더에 최신 폴더로 파일을 복사하기 위한 모듈^^
@echo off
FOR /F "delims=" %%i IN ('dir /b /ad-h /t:c /o-d') DO (
SET a=%%i
GOTO :found
)
echo No subfolder found
goto :eof
:found
echo Change the most recent subfolder: %a%
cd %a%반응형
'dos' 카테고리의 다른 글
| 파일명 일괄 수정하기 (0) | 2026.09.11 |
|---|---|
| bat 에서 옵션 입력받기 (0) | 2026.06.22 |
| for /f (0) | 2026.05.14 |
| 폴더명과 일치하는 도면들 해당 폴더로 이동하기 (0) | 2026.05.14 |
| 특정 기간에 특정 파일만 찾기 (0) | 2026.04.24 |