Friday, August 4, 2017

batch - Run other cmd in bat like from it's own path

I need to run bat(fix.bat) in cmd batch file (let's say sample.cmd on c:)
The problem is that despite of using:
start /WAIT cmd.exe /C D:\dev\sys\fix.bat


fix.bat runs like from parent command (c:\sample.cmd) but I need to force it to run from its path ("d:\dev\sys")


How to run bat in other bat so the second one will run like executed from it's own path where it's located?


There in example would help to enter:
"cd d:\dev\sys" and then call for fix.bat but I want to avoid that.

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...