1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
def rech_dossier(Rep,NbFic_lu,Cp):
if Rep != None:
for path, dirs, files in os.walk(Rep,topdown=False):
NbFic_lu += 1
for xname in range(len(Tab_list_dossiers)):
for filename in (files):
if str(Tab_list_dossiers[xname]) == (filename):
Cpt += 1
Tab_Dossier.append("Dossier - : "+Rep+" >>"+filename)
Txts.insert(END," - "+filename+'\n','color')
Txts.delete("1.0",END)
Txts.insert(END,"Traitement en cours..."+'\n','big')
Txts.insert(END," . Lecture "+Rep+' en cours...'+'\n')
Txts.update()
return(NbFic_lu,Cpt)
# Lecture repertoire
NbFic_lu,Cpt=rech_dossier('c:\windows',NbFic_lu,Cpt) |
Partager