I have to copy folders from one directory to another directory (Copy only that folders that I have included in a txt file)
I am able to copy all folders but how to copy only specific folders? Eg: I want to copy folder that starts with 111, so it should only copy the folder that starts with 111. So basically, I have to include certain folder names in a txt file and use that text file in my python code so that it would only copy the folders which are included in the txt file.
from distutils.dir_util import copy_tree
fromDirectory = "/a/b/c"
toDirectory = "/x/y/z"
copy_tree(fromDirectory, toDirectory)