edit - Open .bat as txt from another .bat file -


how open .bat file text file in notepad batch script.

what want open file b.bat in notepad using batch script a.bat

i tried:

start notepad tools_originalbuild\repository_test.bat

doesn't work

at moment, path relative, run batch file directory containing batch file (provided relative path given correct). running other directory result in error file not being found.

you can eradicate problem, running relative batch file's location using following code inside batch file:

notepad %~dp0\tools_originalbuild\repository_test.bat 

information on format can found here: what %~dp0 mean, , how work?

this makes assumption that sub directory exists , file exists, of course. check existence first, if wish, that's question investigate on own :)


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -