Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
humbletech99

xcopy: Invalid drive specification

Recommended Posts

when I do xcopy \\machine\share\path\dir d:\placehere /scyih

I get the following error:

Invalid drive specification

0 File(s) copied

However, this command works on some computers, just not others, and I can find no reason for the difference, these are all Windows 2000 or XP machines...

Share this post


Link to post
Share on other sites

Try connecting to the drives through a gui if you can try seperating the arguments "xcopy \\machine\share\path\dir d:\placehere /s /c /y /i /h", post back if this doesn't work.

Share this post


Link to post
Share on other sites
but the directory isn't empty and /e does the same as /s in that case, which is already added in there....

You mean this bit: /scyih ?

Then that's why it isn't working...I assumed that was a directory and amednded that part in my post.

Although you say it works on some computers and not some.... :unsure: Errr you got me on that one.

So it should be...

xcopy /s /c /y /i /h "\\machine\share\path\dir" "d:\placehere\"

p.s Invalid drive spec.

Check that the path to the dir is correct and include the quotes.

Or if you want....

xcopy "\\machine\share\path\dir" "d:\placehere\" /s /c /y /i /h

Share this post


Link to post
Share on other sites

unc names have worked for me on two machines though, one 2000, one XP, and I tried to recreated this, did net use \\hostname\sharename but no luck...

perhaps the drives are mapped on these 2 machines...

Share this post


Link to post
Share on other sites

I mean't from which computer...

If your using the batch file locally then you won't have a problem.

p.s. do you still have a problem?

Share this post


Link to post
Share on other sites

the only relevent line is the xcopy one I already posted since it's the only line that has a problem.

I haven't tried logging off and back on, those aren't my desktops, and I don't see how it could make any difference.

Share this post


Link to post
Share on other sites

the only relevent line is the xcopy one I already posted since it's the only line that has a problem.

I haven't tried logging off and back on, those aren't my desktops, and I don't see how it could make any difference.

Share this post


Link to post
Share on other sites

Can the computers where the batch fails actually access \\machine\share\path\dir from the run command?

p.s. Tells us your exact setup, what's where... etc.

Share this post


Link to post
Share on other sites

If you log off your cached credentials are purged, then you could have a clue as whether it has to do with the computer previously being connected to another one at some time (mapped drive, shared printer or resource, whatever).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy