Sounds like you are not in the correct directory. For example, if your Mame.exe is located in C:\Mame, do the following:
Get to the command prompt, the way you are doing it will work.
Once there, type C: (just to make sure you are on the correct drive letter first)
cd\Mame (to put you in the Mame directory - change to suit your config)
Mame -cc
Done!