How to auto fill login and password after adb shell command in batch script

Good afternoon,

I would like inquire regarding adb shell command solution in batch file.
I would like to clear the data log of testing devices using batch script.
However, the batch script stuck at "mdm9607-perf login: " and did not proceed the next command.
I tried to write dose in batch script to autofill in “root” for login but it is failed. What should I do or write in batch script in order to autofill the login, password and clear data log?

Normal manual command:

  1. adb shell
  2. login: root
  3. password: quectel123
  4. cd /usrdata
  5. cd LOG
  6. rm *txt

Looking forward to your reply
Thanks

Hi, pls add my skype Job.Bao, and could you paste the detailed command log to give me more info to refer to?
Thanks!