I am using the code
from pathlib import Path
from zipfile import ZipFile
with ZipFile("files.zip", "w") as zip:
for path in Path("ecommerce").rglob("*.*"):
zip.write(path)
and the zip file is not created in the ecommerce directory. It is created with other files outside of the said directory. I have changed the path in the Path statement but to no avail. Any possible reason please.