Skip to content

Instantly share code, notes, and snippets.

@MCOfficer
Created December 6, 2018 07:21
Show Gist options
  • Save MCOfficer/eba18d17fa6b3cc0ad807c3ca94238c6 to your computer and use it in GitHub Desktop.
Save MCOfficer/eba18d17fa6b3cc0ad807c3ca94238c6 to your computer and use it in GitHub Desktop.
tiny script that changes to a directory (relative to its location) and executes a command. useful for executables that need to be executed from their directory.
@echo off
set origin=%cd%
cd %~dp0%1
%2
cd %origin%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment