Some Basic Command Prompt Help


Recommended Posts

Hello

 

Sorry if my terminology isn't quite right here.

 

I have a utility that I need to run through command prompt.

It's located in F:\somefolder\

 

Is there a way I can create a shortcut that will always open the cmd at location F:\somefolder\ ready for me to type what I need to?

Link to comment
Share on other sites

2 minutes ago, Sir Topham Hatt said:

Hello

 

Sorry if my terminology isn't quite right here.

 

I have a utility that I need to run through command prompt.

It's located in F:\somefolder\

 

Is there a way I can create a shortcut that will always open the cmd at location F:\somefolder\ ready for me to type what I need to?

cmd /K "cd F:\somefolder\"

 

Make a shortcut to that

  • Like 1
Link to comment
Share on other sites

you could create a .bat file with the following

 

@echo off

F:

cd "F:\somefolder"

start "" "app.exe"

exit

 

doing just F: will change the working drive of the file and then CD will take it to whatever folder you need :)

 

edit: or do you mean you just need the cmd window to open pointed to that location? that can be accomplished similarly

 

@echo off

F:

cd "F:\somefolder"

cmd

This will open the cmd prompt to that folder

  • Like 1
Link to comment
Share on other sites

Thanks both.

I'll give these a go.

 

Discovered the delights of a media downloading program that runs in a CMD window.

 

Although have also found a nice GUI for it...

Link to comment
Share on other sites

If you add the folder into the PATH variable, you can just type the name of the app from anywhere without making batch files or anything.

 

before

c:\somefolder\someapp.exe

 

adding c:\somefolder\ to PATH

"someapp.exe"

 

 

path.png

Link to comment
Share on other sites

you know if you put that folder in your path, you don't need to be in that folder when you run that command you could be in any folder.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.