Skip to content

Instantly share code, notes, and snippets.

@danilobatistaqueiroz
Last active October 30, 2018 17:41
Show Gist options
  • Select an option

  • Save danilobatistaqueiroz/355cac366dc2e8541b9d2a1e330e7f49 to your computer and use it in GitHub Desktop.

Select an option

Save danilobatistaqueiroz/355cac366dc2e8541b9d2a1e330e7f49 to your computer and use it in GitHub Desktop.
command windows tips

Printing Windows %PATH% with every entry on a new line

echo %path:;=&echo.%

Listing all environment variables from command line

SET | more

Creating shortcuts on command window

this command will open a new cmd window:
doskey nw=start cmd /k $*
now type: nw

Recording the command history

its possible to save the list of current session commands to a file: $ doskey /history > somefile.txt

You can press F7 to see a history list of the current session

Setting the title of the command prompt Windows

https://blogs.msdn.microsoft.com/.../setting-the-title-of-the-command-prompt-window/
All you have to do is type: title <your text>

Execute a java batch without command window

call c:\ambiente\setenv7.bat
call start javaw -jar eq.jar
call exit

https://stackoverflow.com/questions/5710839/start-a-java-program-without-the-console
https://stackoverflow.com/questions/324539/how-can-i-run-a-program-from-a-batch-file-without-leaving-the-console-open-after


Links:

https://stackoverflow.com/questions/15884892/print-windows-path-with-every-entry-on-new-line

https://stackoverflow.com/questions/5327495/list-all-environment-variables-from-command-line

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