Bat脚本

  1. 去掉文件名称中的左右括号和空格的bat脚本:
    1.   

      @Echo Off&SetLocal ENABLEDELAYEDEXPANSION

      FOR %%a in (*) do (
      set "name=%%a"
      set "name=!name:(=!"
      set "name=!name:)=!"
      set "name=!name: =!"
      ren "%%a" "!name!"
      )
      exit  

  2. 在手机上自动访问一个网址:
    1.   

      @echo off

      :loop
      adb shell am start -n com.android.browser/.browserActivity
      choice /t 5 /d y /n >nul
      adb shell input tap 298 137
      choice /t 1 /d y /n >nul
      adb shell input text url
      choice /t 1 /d y /n >nul
      adb shell input tap 1006 142
      choice /t 5 /d y /n >nul
      adb shell am force-stop com.android.browser
      choice /t 1 /d y /n >nul

      goto loop

 

相关文章

Centos系统之Shell编程基础知识
从Export理解Shell环境和变量生存期
linux shell数组变量、类型及规则
Centos编程Shell基本工作原理方案
Centos操作系统编程之Shell 问答录
rsync-linux备份脚本