Select Page

Art of BI: Windows Command Prompt Shorten Directory Length Trick

Christian Screen | | April 30, 2010

Developing and testing I use the windows command prompt quite a bit.

Often during testing my binaries and executables build folder is down a path off of the base root about five or more directories deep.  In the command prompt I have to run the common commands to CD (change directory), etc. before I land on the directory where I can then call my test programs.  The main problem with that is that my command prompt window often wraps around or just looks so busy that it irritates me.

I recently ran into a really cool solution that allows you to quickly shorten the command prompt entry line using the SUBST function.  It basically take a couple of parameters and maps an open drive letter for you based on the directory path that you supply.  The below is an example:

subst R:  “C:developmenttoolsprogrammingtestingproject1codetsfrunnablepathnodebin”

Simply take the above example’s syntax and modify it for your next testing episode.  The quotes around the directory path do not always need to be there, however, if you have a folder in that path that contains a space you will definitely need to use the double-quotes.

In the above example simply type SUBST and for the two parameters enter an open drive letter and then the directory path you wish to use.  Hit enter.

The cmd prompt will return cleanly.

Type R: and hit the return key.

Your prompt should return with the R: drive prompt and you can run your code from there.

Good Luck.

Subscribe to Our Blog

Never miss a post! Stay up to date with the latest database, application and analytics tips and news. Delivered in a handy bi-weekly update straight to your inbox. You can unsubscribe at any time.

ORA-12154: TNS:could not resolve the connect identifier specified

Most people will encounter this error when their application tries to connect to an Oracle database service, but it can also be raised by one database instance trying to connect to another database service via a database link.

Jeremiah Wilton | March 4, 2009

12c Upgrade Bug with SQL Tuning Advisor

Learn the steps to take on your Oracle upgrade 11.2 to 12.1 if you’re having performance problems. Oracle offers a patch and work around to BUG 20540751.

Megan Elphingstone | March 22, 2017

Oracle EPM Cloud Vs. On-Premises: What’s the Difference?

EPM applications help measure the business performance. This post will help you choose the best EPM solutions for your organization’s needs and objectives.

Bobby Ellis | April 10, 2018

Work with Us

Let’s have a conversation about what you need to succeed and how we can help get you there.


Work for Us

Where do you want to take your career? Explore exciting opportunities to join our team.