23 lines
687 B
Python
23 lines
687 B
Python
|
|
import os,shutil,fdb
|
|
import re,datetime,funkce1
|
|
|
|
# Connect to the Firebird database
|
|
conn = fdb.connect(
|
|
dsn=r'localhost:c:\medicus 3\data\medicus.fdb', # Database path
|
|
user='SYSDBA', # Username
|
|
password="masterkey", # Password,
|
|
charset="win1250")
|
|
|
|
cesta=r"u:\NextcloudOrdinace\Dokumentace_ke_zpracování"
|
|
|
|
|
|
for soubor in os.listdir(cesta):
|
|
print(soubor)
|
|
if os.path.isfile(os.path.join(cesta, soubor)):
|
|
if funkce1.kontrola_struktury(soubor,conn):
|
|
# info.append(vrat_info_o_souboru(soubor,conn))
|
|
# os.remove(os.path.join(cesta,soubor))
|
|
continue
|
|
else:
|
|
funkce1.prejmenuj_chybny_soubor(soubor,cesta) |