Ausgabe der neuen DB Einträge
This commit is contained in:
parent
bad48e1627
commit
cfbbb9ee3d
2399 changed files with 843193 additions and 43 deletions
24
USB.py
Normal file
24
USB.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue