Last active
August 6, 2016 05:28
-
-
Save imaizume/61ef5df7f51feb92692223f0a1d4b08b to your computer and use it in GitHub Desktop.
ホームディレクトリ以下に好きな名前でショートカットを配置するディレクトリを作りそこへのパスを持つ環境変数を設定する。その後手動でこれらの環境変数をPathに含めると「プログラム名を指定して実行」からショートカットが起動できる。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set BASE=C:%HOMEPATH%\runcommand | |
setx SHORTCUT_HOME %BASE%\shortcuts | |
setx URL_HOME %BASE%\urls | |
setx DIR_HOME %BASE%\dirs | |
mkdir %BASE% | |
mkdir %SHORTCUTS_HOME% | |
mkdir %URL_HOME% | |
mkdir %DIR_HOME% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM Rename this file much shorter such as "-.bat" | |
REM so that you can call much easier. | |
@if "%1"=="" ( | |
echo "Set URL shortcut name to first arg" | |
echo "(e.g. - tw)" | |
@pause | |
) else ( | |
start %1.url | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment