Click here to Skip to main content
15,358,440 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have been trying to copy files from one location to another location using following command..but am not able to execute it successfully due to error am encountering..

exec master..xp_cmdshell "net use t: \\61.16.165.200\D$\ExportReport xitech123! /user:ggsfadata\sfa /persistent:yes"

exec master..xp_cmdshell 'copy E:\ExportReport\*.* \\61.16.165.200\D$\ExportReport'

exec master..xp_cmdshell "net use T: /delete"

i have list of errors which follows below..
1)System error 53 has occurred.
2)The network path was not found.
3)E:\ExportReport\ddd.txt
The network path was not found.
0 file(s) copied.
4)The network connection could not be found.
NULL
More help is available by typing NET HELPMSG 2250.
NULL
NULL

Please help me out...
Posted
Comments
Michael_Davies 17-Dec-15 3:05am
   
Have you tried the commands directly in a cmd shell?

To access D$ requires administrator privilege, make sure you have the rights.

Why map a network resource to T: then never use it only to delete it?
Member 11337367 17-Dec-15 3:44am
   
never tried in cmd sheell..where i have to give administrator privilage..
Member 11337367 17-Dec-15 3:51am
   
I have just tried in cmd shell.I got same reply ie network path was not found
Michael_Davies 17-Dec-15 3:57am
   
So now you know where the problem lies, solve it. There is nothing any one here can give as an answer as it is related to access rights to a network resource.

Your URL uses an IP address that is not a local network address, can you see that IP address from your network; ping it and see if you get a response. Also if it is a remote remote server there will definitely be restrictions on exposing admin shares (D$) directly over the internet normally you would use a VPN for security to access shares remotely.
Member 11337367 17-Dec-15 4:02am
   
small doubt..61.16.165.200 this is not local network address u r telling?
Michael_Davies 17-Dec-15 4:06am
   
That address is an internet routable address, if it is a server on your local network it would normally have a local address as well that you can use locally.

Non-routable or local IP addresses are in the ranges

10.0.0.0 to 10.255.255.255.
172.16.0.0 to 172.31.255.255.
192.168.0.0 to 192.168.255.255.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900