Open command window here: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
Line 8: Line 8:
== Command Prompt/Terminal ⇋ File Explorer (OS: {{Win}}) ==
== Command Prompt/Terminal ⇋ File Explorer (OS: {{Win}}) ==
=== Open a Command Prompt/Terminal from the current File Explorer directory ===
=== Open a Command Prompt/Terminal from the current File Explorer directory ===
File Explorer directory
* {{Gd}} (1) Press {{kbd | key=alt}} + {{kbd | key=d}} to switch to the path bar of file explorer. (2) Enter {{kbd | key = cmd}} in the PATH bar and press {{kbd | key = ENTER}} key to open the console window. Tested on Windows 7, 8, 10.<ref>[http://lifehacker.com/5989434/quickly-open-a-command-prompt-from-the-windows-explorer-address-bar Quickly Open a Command Prompt from the Windows Explorer Address Bar].</ref><ref>[http://isvincent.pixnet.net/blog/post/38873133-windows-7%EF%BC%9A%E5%9C%A8%E5%91%BD%E4%BB%A4%E6%8F%90%E7%A4%BA%E5%AD%97%E5%85%83%E8%A6%96%E7%AA%97%E4%B8%AD%E5%BF%AB%E9%80%9F%E5%88%87%E6%8F%9B%E8%B7%AF%E5%BE%91 Windows 7:在命令提示字元視窗中快速切換路徑 @ 學不完.教不停.用不盡 :: 痞客邦 PIXNET ::]</ref>
* {{Gd}} (1) Press {{kbd | key=alt}} + {{kbd | key=d}} to switch to the path bar of file explorer. (2) Enter {{kbd | key = cmd}} in the PATH bar and press {{kbd | key = ENTER}} key to open the console window. Tested on Windows 7, 8, 10.<ref>[http://lifehacker.com/5989434/quickly-open-a-command-prompt-from-the-windows-explorer-address-bar Quickly Open a Command Prompt from the Windows Explorer Address Bar].</ref><ref>[http://isvincent.pixnet.net/blog/post/38873133-windows-7%EF%BC%9A%E5%9C%A8%E5%91%BD%E4%BB%A4%E6%8F%90%E7%A4%BA%E5%AD%97%E5%85%83%E8%A6%96%E7%AA%97%E4%B8%AD%E5%BF%AB%E9%80%9F%E5%88%87%E6%8F%9B%E8%B7%AF%E5%BE%91 Windows 7:在命令提示字元視窗中快速切換路徑 @ 學不完.教不停.用不盡 :: 痞客邦 PIXNET ::]</ref>


Line 14: Line 15:
* create the cmd.exe shortcut ( c:\windows\system32\cmd.exe ) and set the start location manually
* create the cmd.exe shortcut ( c:\windows\system32\cmd.exe ) and set the start location manually


Total Commander
* If you using the [[Total Commander]], enter {{kbd | key = cmd}} in the bottom PATH bar and press {{kbd | key = ENTER}} key to open the console window.


If you using the [[Total Commander]], enter {{kbd | key = cmd}} in the bottom PATH bar and press {{kbd | key = ENTER}} key to open the console window.
Windows PowerShell
* (left blank intentionally)


=== Open a File Explorer from the current Command Prompt/Terminal directory ===
=== Open a File Explorer from the current Command Prompt/Terminal directory ===

Revision as of 14:29, 19 January 2018

Quick to open the command prompt/terminal window.

Explanation of symbols

  • Symbol . means the current folder on Windows or Unix-like OS.
  • Symbol .. means the upper folder above the current folder on Windows or Unix-like OS.
  • Symbol ~ means the home folder of the user on Cygwin or Unix-like OS[1].

Command Prompt/Terminal ⇋ File Explorer (OS: Win Os windows.png )

Open a Command Prompt/Terminal from the current File Explorer directory

File Explorer directory

  • Good.gif (1) Press alt + d to switch to the path bar of file explorer. (2) Enter cmd in the PATH bar and press ENTER key to open the console window. Tested on Windows 7, 8, 10.[2][3]
  • cmdhere powertoy for windows xp
  • create the cmd.exe shortcut ( c:\windows\system32\cmd.exe ) and set the start location manually

Total Commander

  • If you using the Total Commander, enter cmd in the bottom PATH bar and press ENTER key to open the console window.

Windows PowerShell

  • (left blank intentionally)

Open a File Explorer from the current Command Prompt/Terminal directory

  • Keyin explorer . on the command prompt, it will open the current folder in the file explorer [4]
  • Keyin explorer .. on the command prompt, it will open the upper folder in the file explorer

Cygwin window ⇋ File Explorer (OS: Win Os windows.png )

Open a Cygwin window from the current File Explorer directory

Cygwin

  • (1) Go to your "Send To" folder: C:\Users\<your_user_name>\AppData\Roaming\Microsoft\Windows\SendTo (2) Create a shortcut having this in the Target field: C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico C:\cygwin64\bin\bash.exe -l -c "cd \"$0\" ; exec bash"[5] Icon_exclaim.gif Known issue: the folder name in Chinese will met problem!

Open a File Explorer from the current Cygwin directory

  • Keyin explorer "$(cygpath -w .)" on the Cygwin command, it will open the current folder in the file explorer[6]
  • Keyin explorer "$(cygpath -w ~)" on the Cygwin command, it will open the Cygwin user home folder e.g. C:\cygwin64\home\User in the file explorer [7]

Terminal window ⇋ Finder (OS: macOS icon_os_mac.png )

Open a Command Terminal from the current Finder directory

Open a Finder from the current Command Terminal directory

  • Keyin open . on the terminal prompt, it will open the current folder in the finder
  • Keyin open .. on the terminal prompt, it will open the upper folder in the finder

Copy current path to clipboard

Using tools

Further reading

References