the error is when i do
comando= "cd .."
consola.start(comando);
consola.waitForFinished();
consola.waitForReadyRead();
Nothing happen. it's this my problem thx in advance.
I want to move since cmd console. but i am stand in the same path.
One question if for example i pass the next string = "cd C:\"
how i can take next argument to use like a path.
the code that i have
#ifdef Q_OS_WIN
if(comando=="cd .."){
directorio.cd("..");
}else{
consola.start("cmd.exe /C " + comando);
}
#else
consola.start(comando);
#endif
consola.waitForFinished();
consola.waitForReadyRead();
QProcess consola;
#ifdef Q_OS_WIN
if(comando=="cd .."){
directorio.cd("..");
}else{
consola.start("cmd.exe /C " + comando);
}
#else
consola.start(comando);
#endif
consola.waitForFinished();
consola.waitForReadyRead();
To copy to clipboard, switch view to plain text mode
Directorio is the folder where i am. obviously i need to put inside of directorio.cd the path but if i write for example this string in comando = "cd C:\" how i can get the path???
at the momento not work. and the directorio.cd(".."); doesnt work too. when i do this show me this message QIODevice::read (QProcess): device not open
Bookmarks