# Command Prompt Here

*2009-02-02*

> Add a Command Prompt entry to the Windows XP folder context menu using Folder Options, so you can open a terminal in any selected folder.

Have you ever wanted to open a Command Prompt in the folder you’re browsing in Windows Explorer? On Windows XP, you can add a **Command Prompt** entry to the folder context menu without installing extra software, such as Microsoft’s “Open Command Window Here” PowerToy.

Here’s how:

1. Open **Folder Options** in Control Panel. Alternatively, in Windows Explorer, select **Tools → Folder Options**.

    ![Folder Options dialog in Windows XP](/blog/command-prompt-here-folder-options.png)

2. Select the **File Types** tab. In the **Registered file types** list, select **Folder**, whose extension is shown as **(NONE)**.

    ![File Types tab with Folder selected and the Advanced button indicated](/blog/command-prompt-here-file-types.jpg)

3. Click **Advanced** to open the **Edit File Type** dialog.

4. Click **New** to open the **New Action** dialog.

5. In the **Action** field, enter `Command Prompt` or another name of your choice. In **Application used to perform action**, enter:

    ```text
    cmd.exe /k cd /d "%1"
    ```

    Here, `%1` represents the selected folder. The command changes to that folder, including its drive, and leaves the Command Prompt open.

    ![Edit File Type and New Action dialogs in Windows XP](/blog/command-prompt-here-new-action.jpg)

    The screenshot shows a different example action. Use the name and command shown above for **Command Prompt**.

6. Click **OK** to close **New Action**, then click **OK** in **Edit File Type** and **Folder Options**.

Now, when you right-click a folder in Windows Explorer, you should see a **Command Prompt** entry. Select it to open a Command Prompt in that folder.

*Replacement screenshots by [Debra](https://superuser.com/users/257503/debra), from [“Have Windows XP Explore option default Windows Explorer path”](https://superuser.com/a/663276), licensed under [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/).*

<!-- Original Blogsome image URLs retained for possible future recovery:
http://paskov.blogsome.com/images/FolderOptions.PNG
http://paskov.blogsome.com/images/EditFileType.PNG
http://paskov.blogsome.com/images/NewAction.PNG
-->

