Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal EnableDelayedExpansion
- set direc=%CD%
- set /a max=0
- for %%i in (c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
- if exist %%i:\.. (
- cd %%i:\..
- for /f "delims=^" %%j in ('dir /s /b /a:-d') do (
- set /a cur=%%~zj 2>nul
- if !cur! GTR !max! (
- set /a max=!cur!
- )
- )
- )
- )
- cd %direc%
- echo %max%
- endlocal
Advertisement
Add Comment
Please, Sign In to add comment