0

I want to copy an entire directory to another directory. I tried this:

xcopy SourceDir= C:libraries\documents TargetDir=C:\S:\V (E) Backup

I know people don't usually use specifics, but those are the certain ones I want to use. I keep getting error invalid number of parameters.

I've looked at some of the answers on here but they haven't helped.

  • 2
    Your provided XCopy command line isn't even close to being valid... You should look at xcopy /?. – Ƭᴇcʜιᴇ007 Mar 17 '17 at 17:23
1

I think I see what you are trying to do and where you have it wrong. You can use this command line of xcopy setting the variable for the sourcedir and targetdir folders and using those with the xcooy command.

You can type in xcopy /? to the cmd prompt for detail on the options and where to put the variables.

set sourcedir=C:\libraries\documents
set targetdir=C:\

xcopy "%sourcedir%" "%targetdir%" /S /V /E
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.