+ Post New Thread
Results 1 to 3 of 3
How do you do....it? Thread, xcopy syntax in Technical; I'm having trouble with xcopy as I can't seem to get the syntax correct Keep getting Invalid drive specification. I ...
  1. #1
    leco's Avatar
    Join Date
    Nov 2006
    Location
    West Yorkshire
    Posts
    2,026
    Thank Post
    595
    Thanked 125 Times in 119 Posts
    Rep Power
    41

    xcopy syntax

    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.
    Last edited by leco; 27th August 2010 at 11:48 PM. Reason: found solution - I think

  2. #2

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241
    I think you still need the backslashes if you are using a UNC path. Should be something like:

    Code:
    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.

  3. #3
    leco's Avatar
    Join Date
    Nov 2006
    Location
    West Yorkshire
    Posts
    2,026
    Thank Post
    595
    Thanked 125 Times in 119 Posts
    Rep Power
    41
    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.

SHARE:
+ Post New Thread

Similar Threads

  1. Xcopy oddity
    By leco in forum Windows 7
    Replies: 2
    Last Post: 5th August 2010, 08:02 AM
  2. [Fog] Syntax for specifying OU in AD
    By birchanger in forum O/S Deployment
    Replies: 3
    Last Post: 24th July 2009, 04:02 PM
  3. Xcopy
    By itgeek in forum Scripts
    Replies: 7
    Last Post: 4th June 2009, 10:29 AM
  4. SQL Syntax?
    By ScottStevinson in forum How do you do....it?
    Replies: 2
    Last Post: 8th September 2008, 01:01 PM
  5. samba, acls, xcopy
    By CyberNerd in forum *nix
    Replies: 1
    Last Post: 30th May 2007, 02:50 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •