Tuesday, September 9, 2014

'Command line error' while using STSADM

On trying to execute this in my command prompt I got the 'Command line error' 

Stsadm –o restore –url <site URL>  –filename "<file path>" -overwrite

I had it typed out on notepad and copied and pasted it on the command prompt. This caused the problem.  WHY???? 
Well, surprise surprise... its because the encoding isnt compatible with the command prompt. The hyphen is causing a problem. Instead of UTF-8 it is ANSI. Why does it matter, beats me!

Whatever text editor you use, change it to UTF-8 and type out the command, copy and paste in to the command prompt. It will work. 


do what you didnt want to do in the first place -  type out straight into the command prompt. It will work for sure. :P

No comments: