If you need tips & tricks, here they are...

Start file in same directory as batch file

If you want to be able to start a bat, cmd, exe, com or other executable from the same directory as where you have a batch file. Like this, in the directory c:\private\scripts    you have a batch file called start.bat
In that file you want to start the file calc.exe

Check this out..

%0 has the full name of the batch file, including the path. To change to the directory where the batch file is, you'd want to do:

cd %0\..\

You can run a program in the same directory as the batch file by doing:


So starting calc.exe in the directory c:\private\scripts would mean you put this inside a bat file.

Add comment

Security code

Please consider supporting our efforts.

Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok Decline