Ausgabe der neuen DB Einträge

This commit is contained in:
hubobel 2022-01-02 21:50:48 +01:00
parent bad48e1627
commit cfbbb9ee3d
2399 changed files with 843193 additions and 43 deletions

24
USB.py Normal file
View file

@ -0,0 +1,24 @@
import os
from shutil import copyfile
import time
while True:
mount = os.getcwd() + "/media"
b = os.getcwd() + "/Ziel"
inhaltmount = (os.listdir(mount))
for all in inhaltmount:
try:
a = os.getcwd() + "/media/" + all
inhalta = (os.listdir(a))
inhaltb = (os.listdir(b))
print(inhalta)
if "sicherheitgehtvor.txt" in inhalta:
#print('Stick steckt und wurde autentifiziert')
inhalta.remove('sicherheitgehtvor.txt')
for i in inhalta:
if i not in inhaltb:
print('copy')
copyfile(a+'/'+ i, b + '/' + i)
except:
None
time.sleep(2)