I am working on a backup script in Python, and would like it to be able to ignore folders. I therefore have a list of folders to be ignored, ie ['Folder 1', 'Folder3']. I am using os.walk, and am trying to get it to skip any folder in the ignored folders list or that has any of the ignored folders as a parent directory. Has anyone done this before, as examples I’ve seen don’t seem to work and often end up creating an empty folder?
I am working on a backup script in Python, and would like it to
Share
From the docs:
So, iterate through your list and remove entries that match.