I am trying to map a drive using a batch file. I have tried:
net use m: \\Server01\myfolder /USER:mynetwork\Administrator "Mypassword" /persistent:yes
It works fine. The problem comes when I try to map a folder with spaces on its name:
net use m: \\Server01\my folder /USER:mynetwork\Administrator "Mypassword" /persistent:yes
I have tried using quotes, using myfold~1 but nothing works.
An easy way would be renaming the folder but I have it mapped in more than 300 workstations so is not a very good idea.
I just created some directories, shared them and mapped using:
net use y: "\\mycomputername\folder with spaces"
So this solution gets "works on my machine" certificate. What error code do you get?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With