@echo off
color 01
:start
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: variables ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
set com_run="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
set com_opt=clonevdi
set src_dir="%homepath%\VirtualBox VMs\"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: script starting ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if exist %src_dir% (
goto next1
) else (
goto next2
)
:next1
dir %src_dir% /B /S
echo ---------------------------------------------------------------------------------------
echo ---------------------------------------------------------------------------------------
set /P old_vdi="( Enter old vdi name: ) "
echo.
echo.
set /P new_vdi="( Enter new vdi name: ) "
echo.
echo.
echo This will take a while
echo.
echo please wait...
ping -n 4 127.0.0.1 >NUL
%com_run% %com_opt% %old_vdi% %new_vdi%
goto next2
:next2
echo You screwed up again......somewhere.....
goto end
::goto end
:end
pause