Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anybody know what causes the "move" command in the windows shell to exit with code 1 ? Any error messages I've been able to find by Googling around are very vague, saying just "invalid function". The cause of this is trying to use the "move" command in a Visual Studio 2010 post-build step. I'm using something similar to move /Y srcfileanddir destfileanddir

share|improve this question

Command line errors for windows: (no affiliation)

Error: 1 Incorrect function : Action has attempted to execute non-recognized command in Windows command prompt cmd.exe.

Check your syntax and spelling.

share|improve this answer
up vote 1 down vote accepted

I finally found the problem. A couple of the paths had extra slashes, so there would be a \ separating directories rather than \, and that's what caused it to mess up. The weird thing is that this only happened when the 'move' command was invoked from within Visual Build Pro, not from the command line.

share|improve this answer
Also spaces in the sourcepath could cause this. Adding "" around solved it for me. – Remco Jul 8 '14 at 12:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.