-1

I want to remove all .exe files before compiling a make file. I used the following lines to do that but it doesn't work. What is the problem with QProcess? Is there any other solution to this? Please help.

 QProcess del;
 del.start("rm", QStringList() << outputPath + "/" + "*.exe");  //Removing all .exe files in outputPath.
 del.waitForFinished(-1);

Please help.

Denzil
  • 326
  • 3
  • 15

1 Answers1

1
  1. It is possible to cleanup output in most IDE-s
  2. It is possible to create pre-build events
  3. It is not possible to delete executables that are running (win plaform)
  4. Why you don't use QFile::remove?
  5. In windows you should use backslash \ instead of slash / to as path separator
Dmitry Sazonov
  • 8,801
  • 1
  • 35
  • 61