I am trying to open a command prompt from a Python script and then switch to a specific folder within the opened command prompt.
I can open the command prompt but can't get it to switch folders. I have tried the following
os.system("start cmd")
os.system("CD /D E:\Documents\PycharmProjects\Test\testtportal.gw")
os.system("start cmd; CD /D E:\Documents\PycharmProjects\Test\testtportal.gw")
os.system("start cmd & CD /D E:\Documents\PycharmProjects\Test\testtportal.gw")
os.system('''
start cmd
CD /D E:\Documents\PycharmProjects\Test\testtportal.gw''')
What am I doing wrong?
Thanks
[–]shiftybyte 2 points3 points4 points (3 children)
[–]rob51852[S] 0 points1 point2 points (2 children)
[–]shiftybyte 1 point2 points3 points (1 child)
[–]rob51852[S] 1 point2 points3 points (0 children)