1.

Solve : Ignoring the Ampersand (&) in a Command Line?

Answer»

I'm trying to do a

C:\>net use * \\127.0.0.1\root abcd&d& /USER:administrator

command and UNFORTUNATELY the password used to map the drive happens to have ampersands (&) in it.

So DOS thinks I'm trying to ISSUE two distinct commands instead of one.

How do I get it to stop trying to interpret the ampersand (&) as a special character?

P.S. - We have literally thousands of computers with random passwords generated, so it's not practical to fix the passwords themselves, so please don't make that suggestion.I'm no expert but what happens if you do add an '^' before the '&'

Code: [Select]C:\>net use * \\127.0.0.1\root abcd^&d^& /USER:administrator
If you go to command and type 'echo ^&' it will show the character '&'I believe that was exactly what I was looking for. Thank you.Anytime.



Discussion

No Comment Found