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
Asked
Active
Viewed 7,476 times
1
Alex Marshall
- 241
3 Answers
1
Command line errors for windows: http://www.hiteksoftware.com/knowledge/articles/049.htm (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.
G Koe
- 323
1
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.
Alex Marshall
- 241
-
Also spaces in the sourcepath could cause this. Adding "" around solved it for me. – Remco Jul 08 '14 at 12:41
0
ERRORCODE 1 is set when no files have been found to move.
Herbert
- 23
-
Reference? How would one determine if there was an actual error or just no files to move? – malthe Feb 28 '23 at 13:22
-
1