Skip to content

Instantly share code, notes, and snippets.

@lshaf
Last active September 1, 2017 08:45
Show Gist options
  • Select an option

  • Save lshaf/ded66deac09891d3461f to your computer and use it in GitHub Desktop.

Select an option

Save lshaf/ded66deac09891d3461f to your computer and use it in GitHub Desktop.
Auto direct path to project [windows + VSCODE]
@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
@lshaf

lshaf commented Aug 8, 2017

Copy link
Copy Markdown
Author

Completed with auto open project

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