You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#copy files and folder and compress into a zip file
def backup(source_folder, target_zip):
zipf = zipfile.ZipFile(target_zip, "w")
for subdir, dirs, files in os.walk(source_folder): #The method walk() generates the file names in a directory tree by walking the tree either top-down or bottom-up.