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")
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" )
cd...
? –
Centralization © 2022 - 2024 — McMap. All rights reserved.
cmd
can take arguments (runcmd /?
to see them) you can docmd /K cd c:/
to start cmd atc:
– Retroact