python自动复制_Python自动复制日志,python,拷贝

#!/usr/bin/env python

import os

import time

import re

import os

from time import sleep

cmd3=“adb pull /resources/map/BaiduMapAuto/bnav/log /Users/shixinfa/Desktop/0630/log”

os.system(cmd3)

while True:

file1 = os.stat(’/Users/shixinfa/Desktop/0630/InssdkLog’) # initial file size

os.system(“adb pull /sdcard/InssdkLog /Users/shixinfa/Desktop/0630/InssdkLog”);

sleep(2)

file2 = os.stat(’/Users/shixinfa/Desktop/0630/InssdkLog’) # updated file size

comp = file2.st_size - file1.st_size # compares sizes

if comp == 0:

file22 =os.stat("/Users/shixinfa/Desktop/0630/NaviEngineLog")

os.system(“adb pull /resources/map/BaiduMapAuto/bnav/NaviEngineLog /Users/shixinfa/Desktop/0630/NaviEngineLog”)

sleep(2)

file22after = os.stat("/Users/shixinfa/Desktop/0630/NaviEngineLog")

chazhi=file22after.st_size-file22.st_size;

if chazhi == 0: file33=os.stat("/Users/shixinfa/Desktop/0630/BaiduLocationService")

os.system(“adb pull sdcard/BaiduLocationService /Users/shixinfa/Desktop/0630/BaiduLocationService”)

sleep(2) file33after=os.stat("/Users/shixinfa/Desktop/0630/BaiduLocationService")

cz=file33after.st_size - file33.st_size;

else:

os.system(“adb pull sdcard/BaiduLocationService /Users/shixinfa/Desktop/0630/BaiduLocationService”);

if cz == 0:

print(“copy finshed …”)

else:

os.system(“adb pull /sdcard/InssdkLog /Users/shixinfa/Desktop/0630/InssdkLog”);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值