Commit 9fb65e21 by juan

Mejora en la gestion de archivos

1 parent fe25f9cb
...@@ -53,11 +53,13 @@ class FosaDiaria(): ...@@ -53,11 +53,13 @@ class FosaDiaria():
def BuscarExcelDescargado(self,tmp="/dev/shm/tmpscdecas.txt"): def BuscarExcelDescargado(self,tmp="/dev/shm/tmpscdecas.txt"):
rta = "" 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') file1 = open(tmp, 'r')
Lines = file1.readlines() Lines = file1.readlines()
for line in Lines: for line in Lines:
print("Line: {}".format(line.strip())) der = line.split(" ")[0]
archivo = f"""{der}"""
print(archivo)
file1.close() file1.close()
os.system(f"""rm {tmp}""") os.system(f"""rm {tmp}""")
return rta return rta
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!