Commit 3ef944e7 by Juan Pablo dure

Prueba de filtro de archivo

1 parent 19ad4ffe
carpetaDescargas = "/home/juan/Descargas/" carpetaDescargas = "/home/juan/Descargas/"
cabezaeraDescargas = "Planilla_Diaria"
\ No newline at end of file \ No newline at end of file
cabezaeraDescargas = "Planilla_Diaria-54"
\ No newline at end of file \ No newline at end of file
...@@ -56,10 +56,11 @@ class FosaDiaria(): ...@@ -56,10 +56,11 @@ 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 | grep {self.cabezaera} | grep xls > {tmp}""") os.system(f"""ls {self.CarpetaDescarga} -ls | grep xls 2> {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)
der = line.split(" ")[0] der = line.split(" ")[0]
archivo = f"""{der}""" archivo = f"""{der}"""
print(archivo) print(archivo)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!