Last active
September 1, 2017 08:45
-
-
Save lshaf/ded66deac09891d3461f to your computer and use it in GitHub Desktop.
Auto direct path to project [windows + VSCODE]
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
@if "%1" == "" goto NOPROJECT | |
@if "%2" == "" goto NODIR | |
@if "%1" == "rn" SET FOLDER=rn | |
@if "%1" == "web" SET FOLDER=web | |
@SET MAIN_FOLDER=\%FOLDER%-project\%2 | |
@if exist "%~d0\%MAIN_FOLDER%" ( | |
@cd /d "%~dp0" | |
@cd %MAIN_FOLDER% | |
@cls | |
@if "%3" == "code" ( | |
code ./ | |
) | |
@goto END | |
) | |
:NODIR | |
@echo Project doesn't exist | |
@goto END | |
:NOPROJECT | |
@echo Please input project folder | |
@echo - rn = React Native Project | |
@echo - web = Web PHP Project | |
@goto END | |
:END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Completed with auto open project