I tried running the bat file manually , it works OK. The bat file runs a java class which detects the folder exists , then write file to mapped drive(Z:/) , which has permissions enabled full control for Authenticated Users.
However, when I use Task Scheduler to run a bat file, it seems that it could not detect the path.
Would like to know how can I make task scheduler to run the bat file such that it can write files on mapped drive?