인터넷을 아무리 뒤져봐도 더 깔끔한 방법이 안 보인다...

linux면 더 formating이 되는데...

windows 에서는 보이지 않는 듯 하다...


--- batch.bat


@echo off


set /A "VAR=0"


:start


set /A "VAR+=1"


IF /I %VAR% LEQ 9 (

goto :add00

)

IF /I %var% LEQ 99 (

goto :add0

)

goto :add


:add00

rem @echo on 

rem echo 00%VAR%

rem @echo off


IF /I %VAR% GEQ 100 (

goto :end

) ELSE (

goto :start

)


:add0

rem @echo on 

rem echo 0%VAR%

rem @echo off


IF /I %VAR% GEQ 100 (

goto :end

) ELSE (

goto :start

)


:add

rem @echo on 

rem echo %VAR%

rem @echo off


IF /I %VAR% GEQ 100 (

goto :end

) ELSE (

goto :start

)


:end


SET /A VAR=0


--- end ---




Rename


--- start ---


@echo off


set /A "VAR=0"


:start


set /A "VAR+=1"


IF /I %VAR% LEQ 9 (

goto :add0

)

IF /I %var% LEQ 99 (

goto :add

)

goto :add


:add0

rem @echo on 

rename "Prison Break S01E0%VAR% 720p BluRay nHD x264 haNc3.smi" 


"Prison.Break.S01E0%VAR%.BDRip.x264-FGT.smi"

rem @echo off


IF /I %VAR% GEQ 100 (

goto :end

) ELSE (

goto :start

)


:add

rem @echo on 

rename "Prison Break S01E%VAR% 720p BluRay nHD x264 haNc3.smi" "Prison.Break.S01E


%VAR%.BDRip.x264-FGT.smi"

rem @echo off


IF /I %VAR% GEQ 100 (

goto :end

) ELSE (

goto :start

)



:end


--- end ---


'Programming' 카테고리의 다른 글

google test vs2015 compiled  (0) 2017.04.01
C++ Unit Testing with Google Test Tutorial [펌]  (0) 2017.03.31
nmake U1077 error 처리방법  (0) 2017.02.15
call by value / call by reference[펌]  (0) 2017.01.17
Source Insight Color Style file  (0) 2017.01.06
Posted by 루나s
,