import os
import subprocess
_json = ["com.seaway.icomm.zy_d294ee7d.apk", "com.soonking.beevideo.apk", "jiapeijishipingtai.apk",
"niyanxj_w7ghost.com.apk"]
path = 'E:\\apk'
for i in os.listdir(path):
# os.listdir(path) 获取到当前目录下所有文件名称
if i in _json:
# 遍历所有文件名称对比 _json列表数据 获取我们需要的数据
src = f"E:\\apk\\{i}" # 来源目录
dst = r"E:\apk1" # 复制新文件目录
cmd = 'copy "%s" "%s"' % (src, dst)
status = subprocess.call(cmd, shell=True)
if status != 0:
if status < 0:
print("Killed by signal", status)
else:
print("Command failed with return code - ", status)
else:
print('Execution of %s passed!\n' % cmd)
03-05
996
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交