humbletech99 Posted June 1, 2006 Report Share Posted June 1, 2006 when I do xcopy \\machine\share\path\dir d:\placehere /scyihI get the following error:Invalid drive specification0 File(s) copiedHowever, 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... Quote Link to comment Share on other sites More sharing options...
Chris Posted June 1, 2006 Report Share Posted June 1, 2006 xcopy /e "\\machine\share\path\dir" "d:\placehere\scyih" Quote Link to comment Share on other sites More sharing options...
humbletech99 Posted June 2, 2006 Author Report Share Posted June 2, 2006 but the directory isn't empty and /e does the same as /s in that case, which is already added in there.... Quote Link to comment Share on other sites More sharing options...
cozofdeath Posted June 2, 2006 Report Share Posted June 2, 2006 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. Quote Link to comment Share on other sites More sharing options...
Chris Posted June 2, 2006 Report Share Posted June 2, 2006 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.... 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 Quote Link to comment Share on other sites More sharing options...
humbletech99 Posted June 2, 2006 Author Report Share Posted June 2, 2006 I've been using xcopy in batch for years at home to back up directories and it's always worked....I'll try what you suggest anyway though... Quote Link to comment Share on other sites More sharing options...
cozofdeath Posted June 2, 2006 Report Share Posted June 2, 2006 Ok, here we go, Microsoft's answer. No UNC names! They offer some workarounds. How did you do this before? Did you map the drive or use a different command?http://support.microsoft.com/?kbid=192808&sd=RMVP Quote Link to comment Share on other sites More sharing options...
humbletech99 Posted June 2, 2006 Author Report Share Posted June 2, 2006 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... Quote Link to comment Share on other sites More sharing options...
Chris Posted June 3, 2006 Report Share Posted June 3, 2006 Where is the batch file being run from? Quote Link to comment Share on other sites More sharing options...
humbletech99 Posted June 3, 2006 Author Report Share Posted June 3, 2006 cmd.exe Quote Link to comment Share on other sites More sharing options...
Chris Posted June 3, 2006 Report Share Posted June 3, 2006 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? Quote Link to comment Share on other sites More sharing options...
humbletech99 Posted June 3, 2006 Author Report Share Posted June 3, 2006 yes it is still broken even when run locally, but it still works on the 2 machines when I re-run it on them, no idea why it doesn't work on the others... Quote Link to comment Share on other sites More sharing options...
Chris Posted June 3, 2006 Report Share Posted June 3, 2006 Post the entire batch. Quote Link to comment Share on other sites More sharing options...
cozofdeath Posted June 3, 2006 Report Share Posted June 3, 2006 On the computers its works on, does it work if you log out and back in then try to run that command again? Quote Link to comment Share on other sites More sharing options...
humbletech99 Posted June 3, 2006 Author Report Share Posted June 3, 2006 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. Quote Link to comment Share on other sites More sharing options...
humbletech99 Posted June 3, 2006 Author Report Share Posted June 3, 2006 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. Quote Link to comment Share on other sites More sharing options...
Chris Posted June 3, 2006 Report Share Posted June 3, 2006 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. Quote Link to comment Share on other sites More sharing options...
cozofdeath Posted June 3, 2006 Report Share Posted June 3, 2006 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). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.