Skip to content

Instantly share code, notes, and snippets.

@chilimangoes
Created October 12, 2015 22:22
Show Gist options
  • Save chilimangoes/c8b46b278245da6ec9b8 to your computer and use it in GitHub Desktop.
Save chilimangoes/c8b46b278245da6ec9b8 to your computer and use it in GitHub Desktop.
caster_install.bat
:: This is a simple batch file to copy my NatLink macros
:: into the NatLink MacroSystem folder. This allows me to
:: have my custom NatLink macros under source control and
:: not mix them in with the built-in macros or the ones
:: that Vocola compiles from VCL macro files.
@echo OFF
cls
echo.
@set APP_DIR=%~dp0
del "C:\NatLink\NatLink\MacroSystem\caster"
del "C:\NatLink\NatLink\MacroSystem\_caster.py"
del "C:\NatLink\NatLink\MacroSystem\_caster.pyc"
call mklink "C:\NatLink\NatLink\MacroSystem\_caster.py" "%APP_DIR%\_caster.py"
call mklink /J "C:\NatLink\NatLink\MacroSystem\caster" "%APP_DIR%\caster"
echo.
echo "Done!"
echo.
pause
@taylor-russ
Copy link

line 14 - this is a bug IMO - this will not delete the link, it will attempt to delete the target of the link (since it is a directory) - note that this only deleted some files on my computer, i'm not sure why it didn't delete all of them. In any case, you need to use rmdir instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment