echo Make dirs, copy init dlls :: Change to the directory where init.cmd is located cd /d %~dp0.. :: Create directories if they do not exist if exist dist-dlls rmdir dist-dlls /s /q mkdir dist-dlls if exist dist-azaion rmdir dist-azaion /s /q mkdir dist-azaion echo Copying shared libs :: Use robocopy to copy files robocopy "C:\\share" "dist-dlls" "*" :: Return to the previous directory cd /d %OLDPWD%