The second file path contains spaces so it needs to be quoted.
copy C:\Users\larry\OneDrive\Pictures\user.png "C:\ProgramData\Microsoft\User Account Pictures"
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
My one-line batch file gets the error message :The syntax of the command is incorrect. I'm pretty sure this is not so.
As in so many many other cases, Microsoft gives a generic error message that has no apparent connection to what the user is trying to do. As a result, we don't know what is going on, and we don't know what to do. So we have to waste the time of a Microsoft representative, and maybe get an answer in a couple of years.
And it's even longer for a CORRECT answer.
Here's my batch file:
| @echo off<br><br>copy C:\Users\larry\OneDrive\Pictures\user.png C:\ProgramData\Microsoft\User Account Pictures |
|---|
Okay, it's two lines.
What I'm trying to do is copy a revised (blank) png file to where it needs to go to appear on the sign-in page.
My guess is that I'm trying to copy to a protected folder. If so, why doesn't Windows tell me that?
I don't see a syntax error.
I'll eventually figure it out, don't worry.
[Naturally, not one of the Topics is remotely appropriate for this question. I'll pick at random, OK?]
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
The second file path contains spaces so it needs to be quoted.
copy C:\Users\larry\OneDrive\Pictures\user.png "C:\ProgramData\Microsoft\User Account Pictures"