Try to add this at the end of your batch file:
pause
Then you will see the kind of error.
Other thing you can do is to disconnect the mapped drive and try the batch again.
You can do it manually from Windows Explorer or by creating a batch file with this content:
NET USE z: /delete /y
Also, try to change the password.