Copy files and catalogs with bar progress [don't work]

I try write coping with folder.
Coping works, but progress bar no and I don’t know what doing …

import shutil
import os
import itertools

from time import sleep
from tqdm import tqdm

# path to source directory
src_dir = '/home/piotr/.cache/'

# path to destination directory
dest_dir = '/home/piotr/.cache/0/'

# getting all the files in the source directory
files = os.listdir('/home/piotr/.cache/')

# progress bar start
for files in itertools.count():
# progress bar finish
shutil.copytree('/home/piotr/.cache/', '/home/piotr/.cache/0/')

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.