Skip to main content

DOS Command To Open Command Prompt In Any Folder & Change Working Directory

Normally Windows DOS Prompt opens in Root directory only. Usually the Primary drive(root) is C and command prompt is open from C drive like C:\. Though by default DOS opens in root drive only, we can make it open from any drive as we need. For a normal user, this article may not be very useful but if you want to run any script on DOS  which are directory specific, this tutorial will help you. We can change the DOS working directory by following any trick from a list of methods. There are registry tricks, CMD command,  Explorer trick etc to change the DOS root directory. In order to change your current DOS directory from C drive to D, use any of the methods listed below.

Cmd Command to Open Command Prompt in Any Directory

At first we can use simple DOS trick to open Command Prompt in any directory. To change the working directory from C drive to D drive from DOS, follow the steps below.

  1. Start DOS (Assume C:\)

  2. Type cd /d d:\ and press enter
    Start CMD Window in E

    Now your current working directory will be D drive. This is one of the simplest methods to change C  to D drive by using DOS. This method works in most of the Windows versions like Windows 8, 7, XP etc.

Open Command Prompt Anywhere By Right Click On Windows 8 & Windows 7

Another simple method to open CMD in any drive is explorer method. You can use this method to open DOS Prompt in Windows 8 and 7 without any additional tweaks. So personally I prefer this method to start DOS Window in any folder on Windows 7 and 8 computers.
  1. Press [Shift] button and Right Click on any folder

  2. Click Open Command window here
    how to start folder in cmd using DOS

  3. It is opened in the chosen folder
    how to change working directory as D

You can open DOS Prompt by using this method in any working folder on Windows 7 and 8. There is no restriction to use this method to start it in any folder. You can even open it on any sub folders in any directory.

Change Command Prompt Root Drive using Registry Edit On Windows XP

Normally you cannot get an option to start DOS Prompt in any folder on XP computer as you see on Windows 8 and 7 computers. However, you can start it in any drive (C , D ,E , F etc), using a simple registry tweak on  XP computer. This registry tweak will allow you to run it in any folder by a right click on it.

  1. Backup Registry Settings

    Playing with registry is critical and you are advised to create a backup of your registry before performing the steps below.
    How to Backup Current Registry On Your Computer

  2. Click on Start and click on run

  3. On run type regedit and click OK

  4. On Registry editor go to the following key:


    Create a new key called Command Prompt.

  5. Create a new sub-key beneath the Command Prompt key called Command. Set the default value to

    Cmd.exe /k pushd % L

  6. Close the registry window
Now right click on any folder on Windows XP computer and check if you have the option to start Command Prompt. By using that option your can change it from C drive to D drive.

Other Suggested Tutorials
  1. How to Access Services  on Microsoft OS

  2. You Don't Have Administrative Rights To Run The Command & Make Sure You Are in Administrative Account

  3. Start WLAN AutoConfig (WLANSVC Service) On Computers

  4. I Do not Have The Permission to Access Control Panel

Technology Blog


Anonymous said…
Jignesh Dawda said…
thanks bro it worked

my blog:
Very nice article. I absolutely love this site.
Stick with it!

Recent Posts

How to Configure Idea 4G & 3G on Android Phone -APN Settings

When you activate Idea GPRS, 4G or 3G Internet on your Android phone, your phone will receive the automatic settings. However, sometimes you may need to configure the Access Point and GPRS settings for Idea (both GSM second and third generation) connection manually on your Android phone. In case if you delete the previous configuration, it is better know how to setup the same settings again by yourself. A wrong Access Point Name can stop you from accessing their mobile broadband service. Otherwise after deleting the existing APN for Idea 3G or GPRS you may need to re-insert the SIM again to get automatic settings from them. If you know the manual configuration steps, you can avoid that hardware procedure. If you are looking for the steps to get maximum speed from Idea 4G, you may click the link below and follow the instructions. The below hack will increase the Idea 4G data transfer speed.

Boost Idea 4G Data Transfer Speed

Steps to Configure Idea 4G/ GPRS/ 3G on Android Click on Applic…

Village Field Assistant in Kerala Revenue (123/2017) Examination

PSC has notified examination for the post Village Field Assistant in Kerala Revenue Department. Category number of the notification is 123/2017. According to this notification, anyone who has passed 10th Standard and having cycling skill can apply. There is no ineligibility for those having higher education standards to apply for Village Field Assistant. So, those who passed HSS, Degree etc can apply. Village Field Assistant is the new name given to the post Village Man in Kerala Revenue Department and is one of the few posts where PSC conducts direct recruitment to Revenue department. Public Service Commission conducts different examinations for each districts and there will be different question papers and cut off marks. Anyone who apply for Village Field Assistant can apply to only one district. Right now, only anticipatory vacancies are reported. So we do not know the exact number of vacancies in each districts. According to High Court verdict in 2006, women too can apply to Vill…

Eligibility and Exam Pattern CBI Officer Recruitment 2017 - Sub Inspector By SSC CGL

To become an officer in Central Bureau of Investigation ( CBI ) is a dream of many youth in India. Though this elite investigation agency is popular among public, many do not know the procedure to join CBI as an officer. This article explains the various criteria, eligibility, exam pattern and procedure to become a CBI officer. Two different agencies conduct examinations to fill vacancies in CBI. They are UPSC and SSC. To become a group A officer in CBI, you must choose Civil Service Examination conducted by UPSC and become an IPS officer. To join as Sub Inspector in CBI, you must go through SSC CGL examination.

Name Of the Post Recruitment Agency Group A OfficerUPSC (Civil Service Examination)Sub InspectorSSC CGL
Where to Apply
If you are dreaming to become an Officer in CBI, you must pass the Combined Graduate Level Examination (CGL ) conducted by Staff Selection Commission (SSC) in every year. You must wait for the next SSC CGL notification and prepare for the same. It is a 4 tier …

PING: Transmit failed. General Failure - Reasons and Solution

Yesterday while checking network connectivity, I received one error message while trying to ping loopback address from my Windows computer. The error message I received is "PING: Transmit failed. General Failure" and all the packets send from command prompt were lost. I tried to ping a different loopback address but the result was same. I fixed the issue by following a set of steps and sharing those troubleshooting steps in this tutorial hoping it may help in case if you experience the same error message PING: Transmit failed. General Failure.

Broadband Hack To Improve Speed

This is the output I received when I ping loopback address.

C:\Users\sijugk>ping Pinging with 32 bytes of data: PING: transmit failed. General failure. PING: transmit failed. General failure. PING: transmit failed. General failure. PING: transmit failed. General failure. Ping statistics for Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)

Reasons an…

Modify SBI Inter-Bank Beneficiary For RTGS & NEFT

To complete online money transfer using either RTGS or NEFT in your State Bank of India net banking account, the first step is to add the account details of the person to whom you are sending money. Once the details are added under Inter-Bank Beneficiary list, you can start sending money to his/her account. However, it is possible that you might have entered wrong details while adding the beneficiary details. SBI allows users to either modify or delete a beneficiary if the user find the details incorrect. This article explains how to modify or delete beneficiary on SBI account within few minutes. The same procedure can be followed if you are seeing you have reached the maximum number of beneficiaries in your account while adding a new one.

Step By Step Instructions To Delete Beneficiary in HDFC Bank

Steps to Add a Beneficiary in State Bank Net-banking Account

Visit the SBI Netbanking login Link and enter netbank username and password.…

DSSSB Recruitment 2017 - LDC, Field Assistant, Librarian, Statistical Assistant, Junior Engineer

DSSSB has invited applications various posts in National Capital Territory of Delhi State Government Service. DSSSB ( Delhi Subordinate Services Selection Board ) is the recruitment agency to fill reported vacancies in Delhi State Government. Latest DSSSB notification invites applications from eligible candidates to various posts under Government of NCT of Delhi and its autonomous bodies. Vacancies are reported in LD Clerk, Grade 4 (DASS) Grade 2(DASS), Statistical Assistant, Junior Engineer, Draughtsman Grade-III, Field Assistant, Food Safety Officer, Librarian and Librarian Trainee. This article explains minimum eligibility to apply for DSSSB recruitment, Pay scale of various posts, age limit to apply, examination fee, mode of application etc. This tutorial also provides study materials based on previous years DSSSB question papers and latest syllabus based model questions. Important details in DSSSB 2017 Recruitment notification is given below.
Date of NotificationLast Date to Apply…