假设有如下文件夹 /sdcard/视频 ,视频这个文件夹里面有一些文件或文件夹。怎么使用 adb 命令清空 视频 文件夹呢??
1
noe132 Sep 27, 2016
adb shell rm -rf /sdcard/视频
adb shell - run remote shell interactively adb shell <command> - run remote shell command |
2
noe132 Sep 27, 2016
好像这个编码问题很棘手
|
3
Septembers Sep 27, 2016
@noe132 command 请加引号
|
4
noe132 Sep 27, 2016
在 windows 环境下,在命令行窗口是 gbk 936 代码页。
如果手动切换成 chcp 65001 ,就不能用输入法 实际上这个命令是由 adb 传进去执行的,所以只要保证传进去编码是正确就行 那么我测试了一下,编辑一个 bat 文件,用 utf-8 编码保存,内容为 ''' adb shell "rmdir /sdcard/视频" ''' 是可以正常删除文件夹的。尽管在 windows 下命令行窗口里中文显示的是乱码。 重点是用 utf-8 编码格式保存。 |
5
noe132 Sep 27, 2016
linux 下应该就不存在编码问题了吧~
|