Hi.
I try write coping with folder.
Coping works, but progress bar no and I don’t know what doing …
Thanks.
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():
tqdm(range(‘files’))
progress bar finish
shutil.copytree(‘/home/piotr/.cache/’, ‘/home/piotr/.cache/0/’)