using xcopy to copy a file says Invalid Parameter....

Posted on 2013-09-10
Medium Priority
Last Modified: 2013-09-10
Trying to run xcopy:

xcopy \\%logonserver%\netlogon\PipelineSegments.store C:\Program Files (x86)\Common Files\Microsoft Shared\VSTA\Pipeline\

fails with Invalid parameter.. I've tried it using this as well:

xcopy "\\%logonserver%\netlogon\PipelineSegments.store" \\%computername%\Program Files (x86)\Common Files\Microsoft Shared\VSTA\Pipeline\

that fails as well..

Just to make sure I wasnt going nuts I did

xcopy c:\test.txt c:\temp and that worked...

so is it something to do with UNC paths?
Question by:seanab
  • 2
LVL 60

Accepted Solution

Bill Prew earned 750 total points
ID: 39481002
Have you tried the below, since you have spaces in the path names you will need to double quote those.

xcopy "\\%logonserver%\netlogon\PipelineSegments.store" "C:\Program Files (x86)\Common Files\Microsoft Shared\VSTA\Pipeline\"

Open in new window


Author Comment

ID: 39481041
Yes I tried that as well, says "invalid drive specification"  I have confirmed I have access to the drive.  If I do not use an UNC path it works, but that does not help me as this is going on during the logon script...

Author Closing Comment

ID: 39481059
billprew, yes that was actually right.. I just couldnt run it from a command prompt.. I ran it from a *.cmd script and it worked.. also I couldnt use "\\%logonserver%\.... but "%logonserver\.."

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Watch the video to know how one can repair corrupt Exchange OST file effortlessly and convert OST emails to MS Outlook PST file format by using Kernel for OST to PST converter tool. It can convert OST to MSG, MBOX, EML to access them. It can migrate…
Through the video, you can check the migration process of Outlook PST file to PDF. Kernel for Outlook to PDF tool can convert Outlook emails with all attributes like Subject, To, From, Cc, Bcc and other folders such as Inbox, Outbox, Sent Items, Jun…
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question