Recently, I’v been working on a project about pre-processing of OCR images. I copy the project to home, when build it , This error occurs: “Error 15 error MSB3073 : The command copy exited with code 1”.

This project is built with vs2010, it works fine at lab. But at my own computer it failed compiling. The problem is with the post-build event, the solution has eight projects, each one copy it’s building result to a working directory “bin”, this command failed to find the building result and cause the compiling error.

I googled it, I find the answer here. The result is that if the working path has spaces somewhere, you must quotes around the params of copy command, such as changing

1
copy $sourcedir $targetdir

to

1
copy "$sourcedir" "$targetdir"

then problem solved.


Comments