I have tried the following to copy the files in Data to another location but received the error "invalid parameters." What is wrong with my command?
C:\xcopy c:\ProgramData\MySQL\MySQL Server 5.7\Data c:\DataBackUp
I have Windows 10.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI have tried the following to copy the files in Data to another location but received the error "invalid parameters." What is wrong with my command?
C:\xcopy c:\ProgramData\MySQL\MySQL Server 5.7\Data c:\DataBackUp
I have Windows 10.
Your source folder needs to be enclosed in double-quotes like this:
C:\xcopy "c:\ProgramData\MySQL\MySQL Server 5.7\Data" c:\DataBackUp
Otherwise the XCOPY command sees the following as separate parameters:
It expects two paths, not three, hence the "Invalid parameters" error.
As a side note, it's only necessary to specify a path to XCOPY (e.g. C:\xcopy
) if you really have a copy of the executable in the root of C: and intend to execute it from there. If not, just start your command with XCOPY
.