0

I want to create a batch file which will open command prompt and connect to adb after changing the directory. My current code opens command prompt and change the directory but does not executes the last command of connecting to adb. If anyone can help me in this direction, it would be great.

@ECHO OFF
cmd.exe /K "cd C:\Users\SAM\AppData\Local\Android\sdk\platform-tools"
adb connect 192.168.200.25:5555
Ross Ridge
  • 35,323
  • 6
  • 64
  • 105
CodeAssasins
  • 227
  • 3
  • 15

1 Answers1

2

cmd /k starts a command prompt process that runs a command and does not quit afterwards. Why are you using cmd.exe at all?

@echo off
cd /d c:\users\sam\appdata\local\android\sdk\platform-tools\
adb connect 192.168.200.25:5555
TessellatingHeckler
  • 21,327
  • 3
  • 37
  • 74