Commit 19ad4ffe by Juan Pablo dure

Merge branch 'pf2023-2' of git.anacsoft.com:Lusho/Pruebas-RTO into pf2023-2

2 parents be9bb359 2585387c
......@@ -56,14 +56,20 @@ class FosaDiaria():
def BuscarExcelDescargado(self,tmp="/dev/shm/tmpscdecas.txt"):
rta = ""
os.system(f"""ls {self.CarpetaDescarga} -ls > {tmp}""")
os.system(f"""ls {self.CarpetaDescarga} -ls | grep {self.cabezaera} | grep xls > {tmp}""")
file1 = open(tmp, 'r')
Lines = file1.readlines()
for line in Lines:
print("Line: {}".format(line.strip()))
der = line.split(" ")[0]
archivo = f"""{der}"""
print(archivo)
rta = archivo
file1.close()
os.system(f"""rm {tmp}""")
return rta
def LimpiarCarpertaDescarga(self):
os.system(f"""rm {self.CarpetaDescarga}{self.cabezaera}*""")
try:
os.system(f"""rm {self.CarpetaDescarga}{self.cabezaera}*""")
except Exception as E:
print(f"Error al intentar borrar planillas diarias anteriores: {str(E)}")
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!