Wacky_rubia

bigfileW

Jan 18th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.35 KB | None | 0 0
  1. @echo off
  2. setlocal EnableDelayedExpansion
  3. set direc=%CD%
  4. set /a max=0
  5. 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 (
  6.     if exist %%i:\.. (
  7.         cd %%i:\..
  8.         for /f "delims=^" %%j in ('dir /s /b /a:-d') do (
  9.             set /a cur=%%~zj 2>nul
  10.             if !cur! GTR !max! (
  11.                 set /a max=!cur!
  12.             )
  13.         )
  14.     )
  15. )
  16. cd %direc%
  17. echo %max%
  18. endlocal
Advertisement
Add Comment
Please, Sign In to add comment