Router: Asus GT-AX6000
PC: Windows 10 Home
I have a simple batch file that I want to mirror a directory on the same machine as the Windows task running the batch file, to a directory on a router attached USB drive. I have the same username on my Windows PC as a user on the router, but different passwords. I use "net use" to authenticate using the other credentials. I think I need to set a flag so that the credentials aren't stored permanently and only for each batch run, but that's a further development if I can get this to work once. The batch file is run under an administrator account on the PC, and the router user has read/write access to all directories. I can browse to the USB drive on the router just fine in Windows Explorer from multiple PCs on the LAN, each using a different router credentials. Read/write through Windows Explorer works as expected.
Here is the generalized code currently:
After researching this, I added the extra flags other than the "/e", just for the sake of LAN efficiency, although this is not going to be running that frequently or too terribly large of files that it is actually needed. Regardless, the error is the same in any case.
net use error:
robocopy error:
Whether I used the device name or the IP address, the error was the same, until I ran it just before making this post and the net use error was different. I don't know what would have change with my network to get the different result when using the device name, the only difference in the code is "router ip address" is replaced with "devicename". Again, until today they both gave the net use error above. The robocopy error is the same in all cases.
net use error using device name:
PC: Windows 10 Home
I have a simple batch file that I want to mirror a directory on the same machine as the Windows task running the batch file, to a directory on a router attached USB drive. I have the same username on my Windows PC as a user on the router, but different passwords. I use "net use" to authenticate using the other credentials. I think I need to set a flag so that the credentials aren't stored permanently and only for each batch run, but that's a further development if I can get this to work once. The batch file is run under an administrator account on the PC, and the router user has read/write access to all directories. I can browse to the USB drive on the router just fine in Windows Explorer from multiple PCs on the LAN, each using a different router credentials. Read/write through Windows Explorer works as expected.
Here is the generalized code currently:
Code:
net use "\\router ip address\share" [router user password] /USER:[router username]
robocopy "C:\Users\username\local directory" "\\router ip address\share" /e /z /ZB /TBD /R:5 /W:5 /V /compress
After researching this, I added the extra flags other than the "/e", just for the sake of LAN efficiency, although this is not going to be running that frequently or too terribly large of files that it is actually needed. Regardless, the error is the same in any case.
net use error:
System error 53 has occurred.
The network path was not found.
robocopy error:
ERROR 67 (0x00000043) Getting File System Type of Destination \\router ip address\share\
The network name cannot be found.
Whether I used the device name or the IP address, the error was the same, until I ran it just before making this post and the net use error was different. I don't know what would have change with my network to get the different result when using the device name, the only difference in the code is "router ip address" is replaced with "devicename". Again, until today they both gave the net use error above. The robocopy error is the same in all cases.
net use error using device name:
System error 1219 has occurred.
Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.