您如何可靠地将文件从Android移至Windows PC?
我正在尝试设置一个可以将视频文件(.MP4)从我的Android手机移至Windows PC(或更准确地,更准确地,到外部SSD)的BASH脚本。目的是节省时间传输文件,因为我每天在其他事情之间多次进行此操作,因此我想自动进行。
我知道可以使用 adb luck 移动文件和文件然后使用ADB Shell之后在电话上删除它们,但是我担心如果ADB拉力失败,它可能会删除一些视频文件。因此,我正在寻找一种解决方案,该解决方案在将文件从手机中删除之前是否正确传输了文件。
I'm trying to set up a bash script that can move video files (.mp4) from my android phone to my windows PC (or more accurately, to an external SSD). The goal is to save time transferring files as I will be doing this multiple times a day in between other things, so I want to do it automatically.
I know that it's possible to use adb pull to move the files and then use adb shell to delete them on the phone afterwards, but I am worried that if adb pull fails, it might delete some of the video files. Hence, I am looking for a solution that checks if the files were transferred correctly before deleting them from the phone.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查命令的退出状态并删除如果没有错误
Check the exit status of the command and delete if there is not error