Alex Rivera | Logout

How to call a .bat file from any location in CMD on Windows

Asked 2010-08-20T19:45:20.803
10

I have a Batch file which I want to execute in CMD from any directory. Something like this:

File name: MyBatch

Path: C:\MyBatch.bat

Open CMD: c:\Program Files> MyBatch

How can I accomplish this?

Edit
Report

1 Answer

1

You could just put it in your c:\windows\system32 directory, as its always in the system path.

answered 2010-08-20T19:48:34.643

Your Answer