Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r2650a9f3f8ca6571294f6ce322327b62fc832ab9 -r36113b694009f6d153d227dc68cb87d7be28e046 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 2650a9f3f8ca6571294f6ce322327b62fc832ab9) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 36113b694009f6d153d227dc68cb87d7be28e046) @@ -875,6 +875,12 @@ else: test.log(str(oldFileName+" failed to rename to "+newFileName)) +def remove_files_in_folder(folder_path): + for filename in os.listdir(folder_path): + file_path = os.path.join(folder_path, filename) + os.remove(file_path) + + def vitals_interval_obj(interval): names.o_time_interval_obj["text"] = interval return names.o_time_interval_obj @@ -915,7 +921,7 @@ @return latest_file - (string) returns latest file that append on log folder from sd-data """ try: - list_of_files = glob.glob(config.POST_TREATMENT_LOG_LOCATION) + list_of_files = glob.glob(config.POST_TREATMENT_LOG_FILTER) latest_file = max(list_of_files, key=os.path.getctime) return latest_file except: