|
windows
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
xcopy returns "Invalid drive specification" (w/ out the quotes)The subject error message occurs when using xcopy to a network mapped drive.
Using the xcopy command with the same parameters, only changing the destination to another directory on the C: drive, works fine. (Using the copy option of cut 'n paste also works fine.) How do I get the xcopy command to work successfully so I can include it in a batch file to perform backups across my LAN? Any hint would be appreciated. Thanks! Bill Bill wrote:
Show quoteHide quote > The subject error message occurs when using xcopy to a network mapped drive. I use XCOPY \\sourcecomputer\C\directory\*.* destination /D /S /R /Y> > Using the xcopy command with the same parameters, only changing the > destination to another directory on the C: drive, works fine. > > (Using the copy option of cut 'n paste also works fine.) > > How do I get the xcopy command to work successfully so I can include it in a > batch file to perform backups across my LAN? > > Any hint would be appreciated. Thanks! > > Bill without any problems. Make sure that you can do a dir listing of the source computer and directory. There may be a problem with the sharing or firewalls if you can't. Michael,
Thanks for the post .... dir works fine. Any other thoughts? Bill Show quoteHide quote "Michael W. Ryder" wrote: > Bill wrote: > > The subject error message occurs when using xcopy to a network mapped drive. > > > > Using the xcopy command with the same parameters, only changing the > > destination to another directory on the C: drive, works fine. > > > > (Using the copy option of cut 'n paste also works fine.) > > > > How do I get the xcopy command to work successfully so I can include it in a > > batch file to perform backups across my LAN? > > > > Any hint would be appreciated. Thanks! > > > > Bill > > > I use XCOPY \\sourcecomputer\C\directory\*.* destination /D /S /R /Y > without any problems. Make sure that you can do a dir listing of the > source computer and directory. There may be a problem with the sharing > or firewalls if you can't. > Bill wrote:
> Michael, Can you map the source directory to a network drive? I had to use this > > Thanks for the post .... > > dir works fine. > > Any other thoughts? > method with one computer when a program that used the network path kept getting the "Invalid drive" error message. Every other computer in the office had no problem with the network path. Another thing you might look at is the route command. Maybe there is an entry in there that is preventing XCopy from working or you need to enter one to allow it to work. Show quoteHide quote > Bill > > "Michael W. Ryder" wrote: > >> Bill wrote: >>> The subject error message occurs when using xcopy to a network mapped drive. >>> >>> Using the xcopy command with the same parameters, only changing the >>> destination to another directory on the C: drive, works fine. >>> >>> (Using the copy option of cut 'n paste also works fine.) >>> >>> How do I get the xcopy command to work successfully so I can include it in a >>> batch file to perform backups across my LAN? >>> >>> Any hint would be appreciated. Thanks! >>> >>> Bill >> >> I use XCOPY \\sourcecomputer\C\directory\*.* destination /D /S /R /Y >> without any problems. Make sure that you can do a dir listing of the >> source computer and directory. There may be a problem with the sharing >> or firewalls if you can't. >> Thanks for the post ....
Your hints were helpful and after more fussing, the following now works (using xcopy in an MS-DOS Batch file): xcopy "C:\Docs & Settings\name\My Docs" "\\tgt_laptop\tgt dir" parms For some reason (still not understood) the command fails when using a mapped drive letter for the target_save_location (e.g., Y:). Regards, Bill Show quoteHide quote "Michael W. Ryder" wrote: > Bill wrote: > > Michael, > > > > Thanks for the post .... > > > > dir works fine. > > > > Any other thoughts? > > > > Can you map the source directory to a network drive? I had to use this > method with one computer when a program that used the network path kept > getting the "Invalid drive" error message. Every other computer in the > office had no problem with the network path. > Another thing you might look at is the route command. Maybe there is an > entry in there that is preventing XCopy from working or you need to > enter one to allow it to work. > > > > Bill > > > > "Michael W. Ryder" wrote: > > > >> Bill wrote: > >>> The subject error message occurs when using xcopy to a network mapped drive. > >>> > >>> Using the xcopy command with the same parameters, only changing the > >>> destination to another directory on the C: drive, works fine. > >>> > >>> (Using the copy option of cut 'n paste also works fine.) > >>> > >>> How do I get the xcopy command to work successfully so I can include it in a > >>> batch file to perform backups across my LAN? > >>> > >>> Any hint would be appreciated. Thanks! > >>> > >>> Bill > >> > >> I use XCOPY \\sourcecomputer\C\directory\*.* destination /D /S /R /Y > >> without any problems. Make sure that you can do a dir listing of the > >> source computer and directory. There may be a problem with the sharing > >> or firewalls if you can't. > >> > Mapped drives are always a bad idea in a script or batch file. The drive
mapping could change if a different user is running the file or even if the current user has changed the mapping. UNC names are the way to go. Show quoteHide quote "Bill" <B***@discussions.microsoft.com> wrote in message news:396AC912-D45C-4E68-8BCA-8C0A70FA0950@microsoft.com... > Thanks for the post .... > > Your hints were helpful and after more fussing, the following now works > (using xcopy in an MS-DOS Batch file): > > xcopy "C:\Docs & Settings\name\My Docs" "\\tgt_laptop\tgt dir" parms > > For some reason (still not understood) the command fails when using a > mapped > drive letter for the target_save_location (e.g., Y:). > > Regards, > Bill > > "Michael W. Ryder" wrote: > >> Bill wrote: >> > Michael, >> > >> > Thanks for the post .... >> > >> > dir works fine. >> > >> > Any other thoughts? >> > >> >> Can you map the source directory to a network drive? I had to use this >> method with one computer when a program that used the network path kept >> getting the "Invalid drive" error message. Every other computer in the >> office had no problem with the network path. >> Another thing you might look at is the route command. Maybe there is an >> entry in there that is preventing XCopy from working or you need to >> enter one to allow it to work. >> >> >> > Bill >> > >> > "Michael W. Ryder" wrote: >> > >> >> Bill wrote: >> >>> The subject error message occurs when using xcopy to a network mapped >> >>> drive. >> >>> >> >>> Using the xcopy command with the same parameters, only changing the >> >>> destination to another directory on the C: drive, works fine. >> >>> >> >>> (Using the copy option of cut 'n paste also works fine.) >> >>> >> >>> How do I get the xcopy command to work successfully so I can include >> >>> it in a >> >>> batch file to perform backups across my LAN? >> >>> >> >>> Any hint would be appreciated. Thanks! >> >>> >> >>> Bill >> >> >> >> I use XCOPY \\sourcecomputer\C\directory\*.* destination /D /S /R /Y >> >> without any problems. Make sure that you can do a dir listing of the >> >> source computer and directory. There may be a problem with the >> >> sharing >> >> or firewalls if you can't. >> >> >> |
|||||||||||||||||||||||