I have a bat file with code:
echo Hello There > Result.txt @exit 0
The file is located in a folder named "package", which is located in the root of the project.
I call it with this code in the post-build event:
call "$(ProjectDir)batch\post.bat"
I use @exit 0 because otherwise I get error code 1 (which, it seems to me, tells me that the command failed).
When I double click on the bat file or get called from cmd, it creates the file. What do I need to do to make this work.
EDIT: Guys, make sure your file is ASCII encoded. I created mine with VS, which by default sets the encoding to UTF.
visual-studio-2012 batch-file post-build-event
Ivan Davidov
source share