Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted (edited)

I'm having trouble with xcopy as I can't seem to get the syntax correct:( Keep getting Invalid drive specification.

I want to copy a users files from a PC to a network location. I know it's xcopy source destination just not sure how to specify those. Can anyone help me please?

 

Not to worry think I've found it - had \\ at the start of destination when it should just have been the server name. Will find out in the morning.

Edited by leco
found solution - I think
Posted

I think you still need the backslashes if you are using a UNC path. Should be something like:

 

XCOPY "C:\Folder\Files\*" "\\SERVER\SHARE\Folder\Files\*" /switch1 /switch2 /switch3

 

I always wrap my source/destination in quotes, but this is especially important if you have a space anywhere in either of the paths.

Posted
Thanks Hightower - I think I've found the problem, eventually. The user I was logged in as does not have permissions on the server! Simple user error, comes of working too long and too late. Will have another go today.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...