Adding the Command Prompt to your Shortcut Menu (Win2k/XP)
By Kumar Gaurav,B.Tech(E.C.E),New Delhi.
If you find that you frequently open a Command Prompt window and change to a specific directory, you can add the Command Prompt to your shortcut menu in Windows Explorer. This option enables you to right-click on a folder within
Windows Explorer and choose the Command Prompt option. Windows 2000 will then open a Command Prompt window with that folder as your current directory.
To add a Command Prompt option to your shortcut menu:
- begin by creating a batch file. In our example, we created a batch file named StartPrompt.cmd. Add the
following commands to your batch file:
@echo off
cd /d %1
Title %~f1 - Save this batch file to your Windows 2000 directory (usually C:\WINNT).
- Next, open Windows Explorer.
- Choose Tools | Folder Options to display the Folder Options dialog box.
- Select the File Types tab.
- In the list of Registered File Types, select Folder.
- Click Edit to edit the file types associated with the folder.
- Next, click Advanced to display the Edit File Type dialog box
- Then click New to display the New Action dialog box.
- In the Action text box, type Command Prompt.
- In the Application Used To Perform Action text box, type:
cmd.exe /a /k c:\winnt\StartPrompt "%l" - Click OK to close the New Action dialog box
- Then click OK to close the Edit File dialog box.
- Finally, click Close to close Folder Options.
Now you're all set. In Windows Explorer, right-click on a folder. You should now
see a new option called Command Prompt on the shortcut menu. If you choose this
option, Windows 2000 opens a new Command Prompt window with the selected folder
as your current folder.
0 comments