How can I open command prompt with specific directory using Python?
I could just run command prompt using Python but I'm unable to open with specific directory.
import os
os.system("start cmd")
You can open the specific path using this
import os
os.system("start cmd /K cd C:\\Users\\Name\\Desktop\\File" )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.