Opening current directory in Explorer [duplicate]
You open cmd and type (for example) cd C:\dragons
How can you open C:\dragons in the file explorer? Yes, you can use explorer C:\dragons
, but that is kinda lame. Let's say I'm in the folder C:\dragons\Red\WhiteCrests\infants
, this way just isn't convenient.
Already tried explorer dir
and explorer path
(both of which opens My Documents for some reason), just explorer
(opens the Libraries folder), open
which is undefined, explorer dirname
which gives me that dirname is undefined, and probably other stuff that I can't remember.
Thanks in advance.
...Shamelessly adding to the question with a thought I just had, how can you open a file (say C:\dragons\intro.txt) with a specified program? Like, instead of the default one (like Notepad), open it in Notepad++, without using Notepad++'s (if one exists) command line stuff. Something like:
cd C:\dragons
intro.txt --Notepad++
Solution 1:
explorer .
will open an Explorer point to the current directory.
notepad intro.txt
will open it in Notepad (gotta have it in PATH
; Notepad you probably do already). Same thing goes for Notepad++, put it in PATH
and (maybe rename it to something more pleasing) and use Npp intro.txt
.
Solution 2:
explorer .
That answers your first question.
Solution 3:
Alternatively, you can use the shorter command
start .