@echo off
echo auto med tool for 2013-2018
echo.
set /p maxver=please enter max version (e.g. 2018) : 
if %maxver%!==2013! goto start
if %maxver%!==2014! goto start
if %maxver%!==2015! goto start
if %maxver%!==2016! goto start
if %maxver%!==2017! goto start
if %maxver%!==2018! goto start

echo enter version wrong!
pause
exit

:start
set max_fo=C:\Program Files\Autodesk\3ds Max %maxver%
set rt_fo=C:\Program Files\Chaos Group\V-Ray\RT for 3ds Max %maxver% for x64

echo only med default 3dsmax folder  ( %max_fo% )
echo only med default vray rt folder ( %rt_fo% )

echo.
if exist "%max_fo%\3dsmax.exe"    copy /y ".\max %maxver% vray 3.60.03\vray%maxver%.dlr"       "%max_fo%\plugins\"
if exist "%rt_fo%\bin\vray.exe"   copy /y ".\max %maxver% vray 3.60.03\vray_zzz%maxver%.dll"   "%rt_fo%\bin\"
if not exist "%max_fo%\3dsmax.exe"                    echo looks 3dsmax not in %max_fo%
if not exist "%max_fo%\plugins\vrender%maxver%.dlr"   echo looks vray adv not in %max_fo%\plugins\vrender%maxver%.dlr
if not exist "%rt_fo%\bin\vray.exe"                   echo looks vray rt not in %rt_fo%
echo.

pause