Why Doesnt Command Line Render Work For Maya8.5?

I get this error message:

Error: line 1 : Unknown Maya file version: 8.5.
Maya binary file parse error: : (6) corrupted file structure
File read in 0 seconds.
Warning: Errors have occurred while reading this scene that may result in data loss.
Error: Error reading file.
Error:
Error: Invalid flag: -exitCode

I can render fine from inside maya, and I made the file in maya 8.5 so i dont understand why it wont read its own file.
How can I make this work?

You have 2 versions of maya installed, this leads to a situation where your path varaible contains 2 places where it can find the render command. Now since it can only use 1 of them it chooses the one it finds first (and that in this case is the older one)

I have 3 suggestions (I use number 2, 3 probably makes most sense to 99% of users):

  • Rename maya 8's render to render8, 7's to render 7 etc..
  • Make a batch file thet will swap the environment variables in use (tto do thsi you nee dto declare a new path witha reference inside it and then swap the referece with the batc)
  • delete the older mayas renders form the path environment
  • PS. for those of you who read this i cant stress enough the importance of knowing how a command line works, its not a very complex thing so learning to use one is not much work , it will help you understand me, programming, and computers way much better. It works sortof as a springboard to learning how to write scripts, compile and in general make your life easier. Dont forget the gui is built on this stuff, for example in widows its very much there still.

    (for example compared to the time it took you to learn the mouse in first place its about 1-2 times that amount of time, dont underestimate how hard its to learn to use a mouse i teach it every month to elderly people and it can take them weeks to get it done to any sufficiently proficient level. you just learned it so early you cant remember. I on the otherhand was fortunate to learn cmds first, because that was all they ahad at the time)