I want to zip a folder at x location to y location, I have written code for it. This is my code -
cwd = os.getcwd()
os.chdir(path.realpath(f"/y"))
shutil.make_archive(filename, "zip", file_path)
os.chdir(cwd)
I don't want to change directories, can I pass path of the folder I want to zip and path of the destination where I want to store that zipped folder? is this possible using python ?