How to programmatically launch console/terminal and change its current directory to a certain path?
Language: C++/Qt, but I’m sure here the language doesn’t matter.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On systems that support the C library
system()call, you could just directly launch a command shell. What command depends on OS:For Windows, you want something like:
(escape backslashes as necessary)
For Unix variants, it could be an X11 terminal program with options to specify command to run: