# Update the progress bar progress_bar['value'] = (len(file) / total_size) * 100 root.update_idletasks()