Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
I recently blogged a favourite shortcut of mine to get to the command prompt from Windows File Explorer command bar: https://blogs.msdn.microsoft.com/jamiedalton/2017/08/03/windows-productivity-tip-file-explorer-command-prompt-and-back-from-the-current-directory/
This is so ingrained in my day-to-day workflow, I wanted to extend this to another heavily used application, VS Code.
VS Code comes with a neat trick already, when at the command prompt, you can open VS Code to the current folder by using:
c:\grandparent\parent\child\code .
But if you,re in Windows the quickest way to do this is the right-click context menu - Open with Code. But by creating a simple batch file called "code.bat" and dropping it into the C:\windows\system32 directory you can get the above cmd in the Explorer bar trick to invoke VS Code at the current Windows File Explorer directory ie:
[video width="772" height="474" mp4="https://msdnshared.blob.core.windows.net/media/2017/08/VS-Code-shortcut.mp4"][/video]
@echo off
start "" "%ProgramFiles(x86)%\Microsoft VS Code\code.exe" .
@echo off
start "" "%ProgramFiles%\Microsoft VS Code\code.exe" .
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in