How do I write a command line in a .bat or .cmd that maps a network drive? I want the script to first check if the drive-letter is mapped, and if it is delete it and then map the drive.
I only have the mapping-command right now. Please help me fill in the blanks:
REM Check if drive exists, if it does, delete it @echo off net use q: /persistent:yes \\localhost\C$\MyFolder pause
Are there any of the parameters wrong? Any that should be added?