Hello Chetan,
The post-build event sounds like a good idea, indeed.
However, it is not the
"mkdir" command that is not working.
In cases like this, the best thing to do would be to manually test your command and see if it helps. Your command can be tested in the following way:
- open a Run window (WIN+R button) and type in the following:
By running the above command, you will see that nothing happens, there is not a "temp" folder created on the "c:\" drive.
However, this does not help much either. The reason of this is because the
"/c" command tells the command prompt to run a specific command and then terminate. In this case, we need the command prompt to not terminate, so we can see what is wrong with our code. To do so, we can simply use the
"/k" command instead. The /k runs a command and then returns to the command shell. This is really useful for examining variables (mainly for debugging purposes).
By running the same command with the "/k" parameter, you will notice that the whole command is incorrect. In the command shell, you will receive the following:
"The syntax of the command is incorrect."
Long story short, the syntax should look something as it follows:
cmd.exe /s /q /k mkdir c:\temp
With that being said, your build event should look as it follows:
- Chetan RUN.PNG (11.18 KiB) Viewed 2444 times
Hope this helps.
Best regards,
Catalin