Пример #1
0
def execute_client(threadName, config):

    relevant_path = config["pathToSharedFolder"]
    if os.path.exists(relevant_path + "temp/"):
        shutil.rmtree(relevant_path + "temp/")

    delete_extensions = ["track", "temp", "txt", "jpg", "pdf"]

    deleteFilesList = [fn for fn in os.listdir(relevant_path) if any(fn.endswith(ext) for ext in delete_extensions)]

    for f in deleteFilesList:
        os.remove(relevant_path + f)

    client_module(socket, config)
Пример #2
0
def execute_client( threadName, config):

  relevant_path = config["pathToSharedFolder"]
  if os.path.exists(relevant_path+"temp/"):
    shutil.rmtree(relevant_path+"temp/")
    
  delete_extensions = ['track','temp','txt','jpg','pdf']
    
  deleteFilesList = [fn for fn in os.listdir(relevant_path)
            if any(fn.endswith(ext) for ext in delete_extensions)]
  
  for f in deleteFilesList:
    os.remove(relevant_path + f)

  client_module(socket, config)