Skip to main content

Create a new batch/cmd file called "subl.cmd", insert the following command then save it to the "C:\Windows\System32" folder.

@echo off

::
:: Create a new batch/cmd file called "subl.cmd", insert the following
:: command then save it to the "C:\Windows\System32" (32-bit), or "C:\Windows\SysWOW64" (64-bit) folder.
::

REM Launch Sublime Text from the command line
REM
REM Usage: subl [arguments] [files]         Edit the given files
REM    or: subl [arguments] [directories]   Open the given directories
REM
REM Arguments:
REM   --project <project>: Load the given project
REM   --command <command>: Run the given command
REM   -n or --new-window:  Open a new window
REM   -a or --add:         Add folders to the current window
REM   -w or --wait:        Wait for the files to be closed before returning
REM   -b or --background:  Don't activate the application
REM   -s or --stay:        Keep the application activated after closing the file
REM   -h or --help:        Show help and exit
REM   -v or --version:     Show version and exit
REM
REM Filenames may be given a :line or :line:column suffix to open at a specific
REM location.

REM Launch Sublime Text from the command line:
call "C:\Program Files\Sublime Text 3\subl.exe" %*