Mapping a network drive using the command line

I have a drive that can be easily mapped if I right-clicked on my computer and clicked on a card. This shared drive is in the company I work for, and I can do this through a VPN. however, I tried to create a script package to do this automatically and should not have to deal with the display every time. So I tried to use

net use k:\\155.XXx.167.160\mydriveName 

but i get an error

 System error 67 has occurred the network name cannot be found. 

Any ideas how I can resolve this? for example, I said that I can manually map the drive by right-clicking on my computer, but I cannot use the command line. Thank you in advance. Miguel

+6
source share
1 answer

You must add a space:

 net use k: \\155.XXx.167.160\mydriveName 
+12
source

All Articles