Search code examples
qt-creatorqmake

Any way to automate a folder delete before building?


Basically, I want to delete the folder named:

build-[Project Name]-Desktop_Qt_5_0_2_MSVC2010_32bit-Debug

before compiling.


Solution

  • Go to project settings (Ctrl+5, a.k.a. 5th mode), and add new build step with custom command 'rmdir', and arguments '/s /q path-to-target-directory'.

    Don't forget that custom build step should be on top of list, before 'qmake' step.