Skip to content

Instantly share code, notes, and snippets.

@McFoggy
Created April 25, 2019 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McFoggy/8c4b5dd84b69cf6d0ea1d0fc32685ec1 to your computer and use it in GitHub Desktop.
Save McFoggy/8c4b5dd84b69cf6d0ea1d0fc32685ec1 to your computer and use it in GitHub Desktop.
Automatically set CMD window title
REM set window title based on open directory
SET WINDOW_TITLE=%~n1%
REM if current directory has a '.title' file, use it instead
IF EXIST %CD%/.title SET /P WINDOW_TITLE=<%CD%/.title
#REM finally set the window title
TITLE %WINDOW_TITLE%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment