Referring to Change directory and execute file in one command
I wrote a simple python shell script that opens the terminal cmd.exe and then should change directory and run a second command in this directory.
os.system("start /B start cmd.exe @cmd /k cd [the directory I want to go] to && [the command I want to execute in the changed directory]")
The program ends up running the second command before the first change directory command is done, hence the second command fails. Need help to wait till first command is completed, and change directory is successful, then in the changed directory, I need to execute the second command.
Thanks, any help would be much appreciated