Editing
Open command window here
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Quick to open the command prompt/terminal window. == Explanation of symbols == * Symbol {{kbd | key=.}} means the current folder on Windows or Unix-like OS. * Symbol {{kbd | key=..}} means the upper folder above the current folder on Windows or Unix-like OS. * Symbol {{kbd | key=~}} means the home folder of the user on Cygwin or Unix-like OS<ref>[https://unix.stackexchange.com/questions/34196/why-was-chosen-to-represent-the-home-directory history - Why was '~' chosen to represent the home directory? - Unix & Linux Stack Exchange]</ref>. == 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 * {{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> * cmdhere powertoy for windows xp * create the cmd.exe shortcut ( c:\windows\system32\cmd.exe ) and set the start location manually Open a Command Prompt/Terminal from the Total Commander directory * 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. Open a Windows PowerShell from ... * (left blank intentionally) === Open a File Explorer from the current Command Prompt/Terminal directory === * Keyin {{kbd | key=explorer . }} on the command prompt, it will open the current folder in the file explorer <ref>[https://www.howtogeek.com/howto/15781/open-a-file-browser-from-your-current-command-promptterminal-directory/ Open a File Browser From Your Current Command Prompt/Terminal Directory]</ref> * Keyin {{kbd | key=explorer .. }} on the command prompt, it will open the upper folder in the file explorer == Cygwin window ⇋ File Explorer (OS: {{Win}}) == === Open a Cygwin window from the current File Explorer directory === Steps for [https://www.cygwin.com/ Cygwin] # Go to your "Send To" folder: {{kbd | key=<nowiki>C:\Users\<your_user_name>\AppData\Roaming\Microsoft\Windows\SendTo</nowiki>}} (howto: [https://www.howtogeek.com/howto/windows-vista/customize-the-windows-vista-send-to-menu/ Customize the Send To Menu in Windows 10, 8, 7, or Vista]) # Create a shortcut having this in the Target field: {{kbd | key=<nowiki>C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico C:\cygwin64\bin\bash.exe -l -c "cd \"$0\" ; exec bash"</nowiki>}}<ref>[https://stackoverflow.com/questions/9637601/open-cygwin-at-a-specific-folder windows - Open Cygwin at a specific folder - Stack Overflow]</ref> {{exclaim}} Known issue: If the folder name contains Chinese characters will met problem! === Open a File Explorer from the current Cygwin directory === * Keyin {{kbd | key=<nowiki>explorer "$(cygpath -w .)"</nowiki>}} on the Cygwin command, it will open the current folder in the file explorer<ref>[https://cygwin.com/cygwin-ug-net/cygpath.html cygpath]</ref> * Keyin {{kbd | key=<nowiki>explorer "$(cygpath -w ~)"</nowiki>}} on the Cygwin command, it will open the Cygwin user home folder e.g. {{kbd | key=<nowiki>C:\cygwin64\home\User</nowiki>}} in the file explorer <ref>[https://stackoverflow.com/questions/9637601/open-cygwin-at-a-specific-folder windows - Open Cygwin at a specific folder - Stack Overflow]</ref> == Terminal window ⇋ Finder (OS: {{Mac}}) == === Open a Command Terminal from the current Finder directory === * {{Gd}} [https://blog.gtwang.org/mac-os-x/open-terminal-here-in-mac-os-finder/ Mac OS 在 Finder 的目前目錄中開啟終端機 - G. T. Wang] * [https://gist.github.com/dragon788/34e9a9945b70dfcc49c6b9f5a202e43c Applescript to launch iTerm2 Version 3+ from OS X Finder via keyboard shortcut or Toolbar] * [http://zipzapmac.com/Go2Shell Go2Shell - ZipZapMac] ([https://itunes.apple.com/tw/app/go2shell/id445770608?l=zh&mt=12 Go2Shell:在 Mac App Store 上的 App]) * [https://github.com/jbtule/cdto GitHub - jbtule/cdto: Finder Toolbar app to open the current directory in the Terminal (or iTerm, X11)] === Open a Finder from the current Command Terminal directory === * Keyin {{kbd | key=open . }} on the terminal prompt, it will open the current folder in the finder * Keyin {{kbd | key=open .. }} on the terminal prompt, it will open the upper folder in the finder == Copy current path to clipboard == Using tools * [[Total Commander]] * sublime text 3: [https://superuser.com/questions/636057/how-to-set-shortcut-for-copy-file-path-in-sublime-text-3 How to set shortcut for `Copy file path` in sublime text 3 - Super User] * [https://notepad-plus-plus.org/zh/ Notepad++] --> Open the file --> Right mouse click on the label --> Copy the path * [https://www.emeditor.com/ EmEditor (Text Editor)] --> Open the file --> Right mouse click on the label --> Copy the path == Further reading == * [http://www.petri.co.il/add_command_prompt_here_shortcut_to_windows_explorer.htm Add Command Prompt Here Shortcut to Windows Explorer] * [[Cygwin convert windows path to linux path]] == References == <references /> [[Category:Windows]] [[Category:Mac]] [[Category:Software]] [[Category:Programming]] [[Category:Cygwin]]
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Exclaim
(
edit
)
Template:Gd
(
edit
)
Template:Kbd
(
edit
)
Template:Mac
(
edit
)
Template:Win
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information