Typing a password in plaintext inside a batch file is a security risk. Instead:
For example, to delete the network drive mapped as Z: , you would use: cmd map network drive better
Hardcoding passwords into a plaintext .bat file is a massive security risk. Anyone with access to the computer can read the file and steal the credentials. Method 1: Prompt for Password Safely Typing a password in plaintext inside a batch