Skip to content

Instantly share code, notes, and snippets.

@maik-s
Last active March 24, 2016 12:50
Show Gist options
  • Save maik-s/bec8f17df159b61d4264 to your computer and use it in GitHub Desktop.
Save maik-s/bec8f17df159b61d4264 to your computer and use it in GitHub Desktop.
this is a simple batch wrapper for creating new batch shortcuts placed in lpath. usage: `create name "path"`
@echo off
set LNAME=%1
set LDIR="%2%"
set LPATH=C:/users/name/path/to/dir
set LEXT=.cmd
set FILENAME=%LPATH%%LNAME%%LEXT%
if not exist FILENAME (
echo @echo off > "%FILENAME%"
echo cd "%LDIR%" >> "%FILENAME%"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment