echo off
c:\dos\subst %1: /d
if "%2"=="" goto end
echo %1: substitute for %2
c:\DOS\subst %1: %2
:end
