Monday, February 04, 2019

After 20+ years in IT .. I finally discovered this...

Originally I was not going to write this post, but after I found out that several other people didn't know this I figured what the heck, why not, maybe this will help someone else as well

Last week I was on a remote session with 2 clients, each run the Advent program . The team I am part of provides a script to run the advent (APX or Axys) executable. This will then generate the portfolios, composites, price, security master, splits and other files. We then zip it up and sftp it over for ingestion so that we can run analytics and attribution

During these calls I interact with system administrators because usually the need to give permissions so that the script runs correctly

None of these admins knew that what I will show you existed. All the co-workers I asked didn't know this either (This could be because they are developers and not admins)



Back in the day (win 98 or perhaps NT 4), there was a windows powertool that you could install and if you right clicked on a folder you would get an option to open a command window and it would be in the path that you right clicked on

Those power tools don't exist anymore and you could do the same by hacking the registry, it's like a 16 step process

But there is a faster way.....

So what I usually did before 2 months ago is that I would select the path


And then I would open a command prompt, type CD and then paste the path...not too complicated

But here is the faster way.... instead of copying the path...just type in cmd in the address bar and hit enter


Boom shakalaka... a command prompt is opened immediately and you are in the same path



Did you know this also works when you type Powershell in the address bar, Eric Darling left me a comment on twitter informing me that it works with powershell as well

Here is what you see after typing it




So there you have it... hopefully it will save you some minutes of valuable time in a year

Also if you knew about this or did not know..leave a comment and let me know





33 comments:

JoeHx said...

Huh, pretty cool. I just tried it in Windows 7 and it works like a charm.

I also know that if you shift-right-click on a folder, there's an option for "Open command window here" but I like this solution better.

Anonymous said...

That's pretty cool - but as often as not I want to open a Command Prompt window as/in Administrator mode. I wonder if there's a quick way to do that using this method?

George said...

didn't know that! brilliant! thanks for sharing :)

Unknown said...

I did not know about it, very nice, thank you.

Unknown said...

I always remember this method right after performing the copy+paste method. *doh*

rep_movsd said...

Did you know you can also drag any file or folder onto the CMD window to paste its complete path?

Unknown said...

Didn't know :-D Thankyou

Unknown said...

Didn't know this before

Unknown said...

Thank you for sharing this awesome shortcut.

Hador_NYC said...

Very useful. Great post

Danik said...

And there's another tip, the other way around:
From cmd, when you're in the desired directory, run the following command to open that dieectory in explorer:
Explorer .

MartinKing said...

Very cool! I knew about the option to invoke command prompt by right clicking on the folder node on Windows Explorer. But this is even better! Thanks for sharing.

Unknown said...

Great trick

F4V said...

Already knew it 👍

Dr. Vlad said...

Great, I will try this trick!
If you want do it in reverse you can print in CMD:
Start.
It will open a window from the place you are in.

Branden said...

Also, if you hold SHIFT and RIGHT CLICK in the folder, there will be an option to "Open command window here". In newer versions of windows, it changed from command window to powershell.

Knile said...

Yeah it’s a nice trick, but as a admin to access that folder with my domain admin account i need run as different user or I need to run cmd/powershell over UAC

Unknown said...

Anyway to open in admin mode?

Anonymous said...

It doesn't work for absolute network share paths. CMD states unknown UNC. Shift + Right click > open Cmd.. actually figured out the network mount drive letter, but CMD in address bar is no bueno. Win7 pro

Denis said...

To open a an admin cmd

cmd runas /user:Administrator

works for me on win7 but on win 10 it opens a regular command window

Jeremy said...

Also you can do the reverse if you Invoke-Item from powershell. `ii .` works wonders.

Unknown said...

Tried it on my first window open and didn't work, guess it doesn't work on mapped or network drives

Yaniv bd said...

Very cool, thanks for sharing! Powershell works too by typing powershell. However, I couldn't load it as an administrator..

crankin said...

Veey cool. Didn't know. Thought I knew everything.

Shahid Mehmood Arain said...

Very cool trick. thanks

Unknown said...

you can also do (shift)+(right click) to open powershell.

Imran said...

And I always thought we are the only team in the world using Axys for Portfolio reporting :P

Anonymous said...

Very nice ��. The open command prompt here hack is still available as registry files to install or uninstall.

Anonymous said...

Thank you very much! I didn't know this. Very Nice!

Unknown said...

You could also drag the folder in your cmd

Unknown said...

Yes that’s is one of the shortcut to open the path to from windows rather than typing in command but not offending this but it’s nothing new in it.

Unknown said...

Type notepad.exe in the adresbar and it opens as well.

Unknown said...

I've used this trick for a few years now. I love my shortcuts, I use alt+d to highlight the address bar and then type cmd/powershell.